class_docstr: RPN target generator network.
  
  Parameters
  ----------
  num_sample : int, default is 256
      Number of samples for RPN targets.
  pos_iou_thresh : float, default is 0.7
      Anchor with IOU larger than ``pos_iou_thresh`` is regarded as positive samples.
  neg_iou_thresh : float, default is 0.3
      Anchor with IOU smaller than ``neg_iou_thresh`` is regarded as negative samples.
      Anchors with IOU in between ``pos_iou_thresh`` and ``neg_iou_thresh`` are
      ignored.
  pos_ratio : float, default is 0.5
      ``pos_ratio`` defines how many positive samples (``pos_ratio * num_sample``) is
      to be sampled.
  stds : array-like of size 4, default is (1., 1., 1., 1.)
      Std value to be divided from encoded regression targets.
  allowed_border : int or float, default is 0
      The allowed distance of anchors which are off the image border. This is used to clip out of
      border anchors. You can set it to very large value to keep all anchors.
code: def __init__(
      self,
      num_sample=256,
      pos_iou_thresh=0.7,
      neg_iou_thresh=0.3,
      pos_ratio=0.5,
      stds=(1.0, 1.0, 1.0, 1.0),
      allowed_border=0,
  ):
      super(RPNTargetGenerator, self).__init__()
      self._num_sample = num_sample
      self._pos_iou_thresh = pos_iou_thresh
      self._neg_iou_thresh = neg_iou_thresh
      self._pos_ratio = pos_ratio
      self._allowed_border = allowed_border
      self._bbox_split = BBoxSplit(axis=-1)
      self._sampler = RPNTargetSampler(
          num_sample, pos_iou_thresh, neg_iou_thresh, pos_ratio
      )
      self._cls_encoder = SigmoidClassEncoder()
      self._box_encoder = NumPyNormalizedBoxCenterEncoder(stds=stds)
  
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 RPNTargetGenerator object from inherited base classes: gluon with example: obj = RPNTargetGenerator(num_sample, pos_iou_thresh, neg_iou_thresh, pos_ratio, stds, allowed_border)