new_loss_class | R Documentation |
new_loss_class()
is an alias for Loss()
.
See ?
Loss()
for the full documentation.
new_loss_class(
classname,
call = NULL,
...,
public = list(),
private = list(),
inherit = NULL,
parent_env = parent.frame()
)
classname |
String, the name of the custom class. (Conventionally, CamelCase). |
call |
function(y_true, y_pred) Method to be implemented by subclasses:
Function that contains the logic for loss calculation using
|
... , public |
Additional methods or public members of the custom class. |
private |
Named list of R objects (typically, functions) to include in
instance private environments. |
inherit |
What the custom class will subclass. By default, the base keras class. |
parent_env |
The R environment that all class methods will have as a grandparent. |
A function that returns Loss
instances, similar to the
builtin loss functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.