class_docstr: Monitoring metric object. Supports two types of reduction: mean and sum.
docstr: Update the state of the metric by summing up the metric values and updating the counts by adding
  the number of instances for which the metric was computed (first dimension).
docstr_tok: ["Update","the","state","of","the","metric","by","summing","up","the","metric","values","and","updating","the","counts","by","adding","the","number","of","instances","for","which","the","metric","was","computed","(","first","dimension",")","."]
code: def update_state(self, values: np.ndarray):
      """
      Update the state of the metric by summing up the metric values and updating the counts by adding
      the number of instances for which the metric was computed (first dimension).
      """
      self.total += values.sum()
      self.count += values.shape[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 3 for calling the Metric obj's underlying member method code with example usage: obj.update_state(values) without return types