class avalanche.evaluation.metrics.Sum[source]

The standalone sum metric.

This utility metric is a general purpose metric that can be used to keep track of the sum of a sequence of values.

Beware that this metric only supports summing numbers and the result is always a float value, even when update is called by passing int only.


Creates an instance of the sum metric.

This metric in its initial state will return a sum value of 0. The metric can be updated by using the update method while the sum can be retrieved using the result method.



Creates an instance of the sum metric.


Resets the metric.


Retrieves the sum.


Update the running sum given the value.