code: def update(self, labels, preds):
      self.count += 1
      label = labels[0]
      pred_label = preds[1]
      # print('ACC', label.shape, pred_label.shape)
      if pred_label.shape != label.shape:
          pred_label = mx.ndarray.argmax(pred_label, axis=self.axis)
      pred_label = pred_label.asnumpy().astype("int32").flatten()
      label = label.asnumpy()
      if label.ndim == 2:
          label = label[:, 0]
      label = label.astype("int32").flatten()
      assert label.shape == pred_label.shape
      self.sum_metric += (pred_label.flat == label.flat).sum()
      self.num_inst += len(pred_label.flat)
  
file_path: insightface/recognition/arcface_mxnet/metric.py
imports: import numpy
  import mxnet
label_desc: Use image node_id 2 for calling the AccMetric obj's underlying member method code with example usage: obj.update(labels, preds) without return types