pytorch_pfn_extras.training.AccuracyMetric#

class pytorch_pfn_extras.training.AccuracyMetric(label_key, output_key)#

Bases: object

A metric for an evaluator to report accuracy.

Parameters:
  • label_key (str) – The key name of label.

  • output_key (str) – The key name of prediction.

Methods

__init__(label_key, output_key)

__call__(batch, out)#

Call self as a function.

Parameters:
  • batch (Dict[str, Tensor]) –

  • out (Dict[str, Tensor]) –

Return type:

Dict[str, Any]

__init__(label_key, output_key)#
Parameters:
  • label_key (str) –

  • output_key (str) –

Return type:

None