avalanche.evaluation.metrics.Sum

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.

__init__()[source]

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.

Methods

__init__()

Creates an instance of the sum metric.

reset()

Resets the metric.

result()

Retrieves the sum.

update(value)

Update the running sum given the value.