class_docstr: Monitoring metric object. Supports two types of reduction: mean and sum.
docstr: Constructor.
  
  Parameters
  ----------
  reduction
      Metric's reduction type. Possible values `mean`|`sum`. By default `mean`.
  name
      Name of the metric.
docstr_tok: ["Constructor",".","Parameters","--","--","--","--","--","reduction","Metric","'s","reduction","type",".","Possible","values","`","mean","`","|","`","sum","`",".","By","default","`","mean","`",".","name","Name","of","the","metric","."]
code: def __init__(
      self, reduction: Reduction = Reduction.MEAN, name: str = "unknown"
  ):
      """
      Constructor.
  
      Parameters
      ----------
      reduction
          Metric's reduction type. Possible values `mean`|`sum`. By default `mean`.
      name
          Name of the metric.
      """
      self.reduction = reduction
      self.name = name
      self.total, self.count = 0, 0
  
imports: import torch
  import numpy
  from enum import Enum
  from abc import ABC, abstractmethod
  from typing import Dict, Union, Callable
label_desc: Use image node_id 1 to create a new Metric object from inherited base classes: ABC with example: obj = Metric(reduction, name)