class_docstr: Meter to calculate top-k accuracy for single label/ multi label
  image classification task.
class_docstr_tok: ["Meter","to","calculate","top-k","accuracy","for","single","label\/","multi","label","image","classification","task","."]
code: def value(self):
      # Return value based on the local state of meter which
      # includes the local sample count since last sync and the total global sample
      # count obtained at the last sync
      correct_predictions = {
          k: self._curr_correct_predictions_k[i]
          + self._total_correct_predictions_k[i]
          for i, k in enumerate(self._topk)
      }
      sample_count = self._total_sample_count + self._curr_sample_count
      return {
          "top_{}".format(k): (
              correct_predictions[k] / sample_count
          ).item()
          if sample_count
          else 0.0
          for k in self._topk
      }
  
file_path: ClassyVision/classy_vision/meters/accuracy_meter.py
imports: from typing import Any, Dict, Sequence
  import torch
  from classy_vision.generic.distributed_util import all_reduce_sum
  from classy_vision.generic.util import is_pos_int, maybe_convert_to_one_hot
  from classy_vision.meters import ClassyMeter
  from .None import register_meter
label_desc: Use image node_id 5 for calling the AccuracyMeter obj's underlying member method code with example usage: obj.value() and returns: unknown