new_metric_class()
is an alias for Metric()
.
See ?
Metric()
for the full documentation.
new_metric_class(
classname,
initialize = NULL,
update_state = NULL,
result = NULL,
...,
public = list(),
private = list(),
inherit = NULL,
parent_env = parent.frame()
)
A function that returns Metric
instances, similar to the
builtin metric functions.
String, the name of the custom class. (Conventionally, CamelCase).
Recommended methods to implement. See description section.
Additional methods or public members of the custom class.
Named list of R objects (typically, functions) to include in
instance private environments. private
methods will have all the same
symbols in scope as public methods (See section "Symbols in Scope"). Each
instance will have it's own private
environment. Any objects
in private
will be invisible from the Keras framework and the Python
runtime.
What the custom class will subclass. By default, the base keras class.
The R environment that all class methods will have as a grandparent.