crested.tl.metrics.ZeroPenaltyMetric#

class crested.tl.metrics.ZeroPenaltyMetric(name='zero_penalty_metric', **kwargs)#

Zero penalty metric.

Attributes table#

Methods table#

add_variable(shape, initializer[, dtype, ...])

add_weight([shape, initializer, dtype, name])

from_config(config)

get_config()

Return the serializable config of the metric.

reset_state()

Reset the state of the metric.

result()

Calculate the result of the metric by averaging the zero penalty over num batches.

stateless_reset_state()

stateless_result(metric_variables)

stateless_update_state(metric_variables, ...)

update_state(y_true, y_pred[, sample_weight])

Update the state of the metric.

Attributes#

ZeroPenaltyMetric.dtype#
ZeroPenaltyMetric.variables#

Methods#

ZeroPenaltyMetric.add_variable(shape, initializer, dtype=None, aggregation='sum', name=None)#
ZeroPenaltyMetric.add_weight(shape=(), initializer=None, dtype=None, name=None)#
classmethod ZeroPenaltyMetric.from_config(config)#
ZeroPenaltyMetric.get_config()#

Return the serializable config of the metric.

ZeroPenaltyMetric.reset_state()#

Reset the state of the metric.

ZeroPenaltyMetric.result()#

Calculate the result of the metric by averaging the zero penalty over num batches.

ZeroPenaltyMetric.stateless_reset_state()#
ZeroPenaltyMetric.stateless_result(metric_variables)#
ZeroPenaltyMetric.stateless_update_state(metric_variables, *args, **kwargs)#
ZeroPenaltyMetric.update_state(y_true, y_pred, sample_weight=None)#

Update the state of the metric.