class_docstr: Computes heatmap accuracy for keypoint
  Parameters
  ----------
  axis : int, default=1
      The axis that represents classes
  name : str
      Name of this metric instance for display.
  output_names : list of str, or None
      Name of predictions that should be used when updating with update_dict.
      By default include all predictions.
  label_names : list of str, or None
      Name of labels that should be used when updating with update_dict.
      By default include all labels.
  ignore_labels : int or iterable of integers, optional
      If provided as not None, will ignore these labels during update.
  Examples
  --------
  >>> predicts = [mx.nd.array([[0.3, 0.7], [0, 1.], [0.4, 0.6]])]
  >>> labels   = [mx.nd.array([0, 1, 1])]
  >>> acc = mx.metric.Accuracy()
  >>> acc.update(preds = predicts, labels = labels)
  >>> print acc.get()
  ('accuracy', 0.6666666666666666)
class_docstr_tok: ["Computes","heatmap","accuracy","for","keypoint","Parameters","--","--","--","--","--","axis",":","int",",","default=1","The","axis","that","represents","classes","name",":","str","Name","of","this","metric","instance","for","display",".","output_names",":","list","of","str",",","or","None","Name","of","predictions","that","should","be","used","when","updating","with","update_dict",".","By","default","include","all","predictions",".","label_names",":","list","of","str",",","or","None","Name","of","labels","that","should","be","used","when","updating","with","update_dict",".","By","default","include","all","labels",".","ignore_labels",":","int","or","iterable","of","integers",",","optional","If","provided","as","not","None",",","will","ignore","these","labels","during","update",".","Examples","--","--","--","--",">",">",">","predicts","=","[","mx.nd.array","(","[","[","0.3",",","0.7","]",",","[","0",",","1",".","]",",","[","0.4",",","0.6","]","]",")","]",">",">",">","labels","=","[","mx.nd.array","(","[","0",",","1",",","1","]",")","]",">",">",">","acc","=","mx.metric.Accuracy","(",")",">",">",">","acc.update","(","preds","=","predicts",",","labels","=","labels",")",">",">",">","print","acc.get","(",")","(","'accuracy","'",",","0.6666666666666666",")"]
docstr: Updates the internal evaluation result.
  Parameters
  ----------
  labels : list of `NDArray`
      The labels of the data with class indices as values, one per sample.
  preds : list of `NDArray`
      Prediction values for samples. Each prediction value can either be the class index,
      or a vector of likelihoods for all classes.
docstr_tok: ["Updates","the","internal","evaluation","result",".","Parameters","--","--","--","--","--","labels",":","list","of","`","NDArray","`","The","labels","of","the","data","with","class","indices","as","values",",","one","per","sample",".","preds",":","list","of","`","NDArray","`","Prediction","values","for","samples",".","Each","prediction","value","can","either","be","the","class","index",",","or","a","vector","of","likelihoods","for","all","classes","."]
code: def update(self, labels, preds):
      """Updates the internal evaluation result.
      Parameters
      ----------
      labels : list of `NDArray`
          The labels of the data with class indices as values, one per sample.
      preds : list of `NDArray`
          Prediction values for samples. Each prediction value can either be the class index,
          or a vector of likelihoods for all classes.
      """
      from ...data.transforms.pose import get_max_pred
  
      labels, preds = check_label_shapes(labels, preds, True)
  
      num_joints = preds[0].shape[1]
  
      for label, pred in zip(labels, preds):
          norm = 1.0
          h = pred.shape[2]
          w = pred.shape[3]
          if self.hm_type == "gaussian":
              pred, _ = get_max_pred(pred)
              label, _ = get_max_pred(label)
              norm = np.ones((pred.shape[0], 2)) * np.array([h, w]) / 10
  
          pred = pred.asnumpy()
          label = label.asnumpy()
          dists = self._calc_dists(pred, label, norm)
  
          acc = 0
          sum_acc = 0
          cnt = 0
  
          for i in range(num_joints):
              acc = self._dist_acc(dists[i])
              if acc >= 0:
                  sum_acc += acc
                  cnt += 1
  
          self.sum_metric += sum_acc
          self.num_inst += cnt
  
imports: import numpy
label_desc: Use image node_id 4 for calling the HeatmapAccuracy obj's underlying member method code with example usage: obj.update(labels, preds) without return types