class_docstr: A sampler to choose positive/negative samples from RPN anchors
  
  Parameters
  ----------
  num_sample : int
      Number of samples for RPN targets.
  pos_iou_thresh : float
      Proposal whose IOU larger than ``pos_iou_thresh`` is regarded as positive samples.
  neg_iou_thresh : float
      Proposal whose IOU smaller than ``neg_iou_thresh`` is regarded as negative samples.
  pos_ratio : float
      ``pos_ratio`` defines how many positive samples (``pos_ratio * num_sample``) is
      to be sampled.
code: def __init__(
      self, num_sample, pos_iou_thresh, neg_iou_thresh, pos_ratio
  ):
      super(RPNTargetSampler, self).__init__()
      self._num_sample = num_sample
      self._max_pos = int(round(num_sample * pos_ratio))
      self._pos_iou_thresh = pos_iou_thresh
      self._neg_iou_thresh = neg_iou_thresh
      self._eps = np.spacing(np.float32(1.0))
  
file_path: gluon-cv/gluoncv/model_zoo/rcnn/rpn/rpn_target.py
imports: from __future__ import absolute_import
  import numpy
  import mxnet
  from mxnet import autograd, gluon
  from ....nn.bbox import BBoxSplit
  from ....nn.coder import SigmoidClassEncoder, NumPyNormalizedBoxCenterEncoder
label_desc: Use image node_id 1 to create a new RPNTargetSampler object from inherited base classes: object with example: obj = RPNTargetSampler(num_sample, pos_iou_thresh, neg_iou_thresh, pos_ratio)