avalanche.evaluation.metric_definitions.Metric
- class avalanche.evaluation.metric_definitions.Metric(*args, **kwargs)[source]
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
Sum,Mean,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 theEvaluationPluginand can emits values on each callback. Usually, an instance of Metric is created within PluginMetric, which is then responsible for its update and results. SeePluginMetricfor more details.- __init__(*args, **kwargs)
Methods
__init__(*args, **kwargs)reset()Resets the metric internal state.
result()Obtains the value of the metric.