Skip to content

average

[ allennlp.training.metrics.average ]


Average Objects#

class Average(Metric):
 | def __init__(self) -> None

This Metric breaks with the typical Metric API and just stores values that were computed in some fashion outside of a Metric. If you have some external code that computes the metric for you, for instance, you can use this to report the average result using our Metric API.

get_metric#

 | @overrides
 | def get_metric(self, reset: bool = False)

Returns

  • The average of all values that were passed to __call__.

reset#

 | @overrides
 | def reset(self)