class_docstr: RPN L1 loss. 
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_bbox_target, rpn_bbox_weight]
      # pred = [rpn_bbox_reg]
      rpn_bbox_target, rpn_bbox_weight = labels
      rpn_bbox_reg = preds[0]
  
      # calculate num_inst (average on those fg anchors)
      num_inst = mx.nd.sum(rpn_bbox_weight) / 4
  
      # calculate smooth_l1
      loss = mx.nd.sum(
          rpn_bbox_weight
          * mx.nd.smooth_l1(rpn_bbox_reg - rpn_bbox_target, scalar=3)
      )
  
      self.sum_metric += loss.asscalar()
      self.num_inst += num_inst.asscalar()
  
imports: import mxnet
label_desc: Use image node_id 2 for calling the RPNL1LossMetric obj's underlying member method code with example usage: obj.update(labels, preds) without return types