- class avalanche.evaluation.metric_definitions.Metric(*args, **kwargs)
Definition of a standalone metric.
A standalone metric exposes methods to reset its internal state and to emit a result. Emitting a result does not automatically cause a reset in the internal state.
The specific metric implementation exposes ways to update the internal state. Usually, standalone metrics like
Accuracy, … expose an update method.
The Metric class can be used as a standalone metric by directly calling its methods. In order to automatically integrate the metric with the training and evaluation flows, you can use
PluginMetricclass. The class receives events directly from the
EvaluationPluginand can emits values on each callback. Usually, an instance of Metric is created within PluginMetric, which is then responsible for its update and results. See
PluginMetricfor more details.
- __init__(*args, **kwargs)
Resets the metric internal state.
Obtains the value of the metric.