class_docstr: RPN accuracy. 
docstr: Updates the internal evaluation result. 
docstr_tok: ["Updates","the","internal","evaluation","result","."]
code: def update(self, labels, preds):
      """Updates the internal evaluation result."""
      # label: [rpn_label, rpn_weight]
      # preds: [rpn_cls_logits]
      rpn_label, rpn_weight = labels
      rpn_cls_logits = preds[0]
  
      # calculate num_inst (average on those fg anchors)
      num_inst = mx.nd.sum(rpn_weight)
  
      # cls_logits (b, c, h, w) red_label (b, 1, h, w)
      pred_label = mx.nd.sigmoid(rpn_cls_logits) >= 0.5
      # label (b, 1, h, w)
      num_acc = mx.nd.sum((pred_label == rpn_label) * rpn_weight)
  
      self.sum_metric += num_acc.asscalar()
      self.num_inst += num_inst.asscalar()
  
imports: import mxnet
label_desc: Use image node_id 2 for calling the RPNAccMetric obj's underlying member method code with example usage: obj.update(labels, preds) without return types