class_docstr: A sampler to choose positive/negative samples from RCNN Proposals
  
  Parameters
  ----------
  num_image: int
      Number of input images.
  num_proposal: int
      Number of input proposals.
  num_sample : int
      Number of samples for RCNN targets.
  pos_iou_thresh : float
      Proposal whose IOU larger than ``pos_iou_thresh`` is regarded as positive samples.
      Proposal whose IOU smaller than ``pos_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.
  max_num_gt : int
      Maximum ground-truth number for each example. This is only an upper bound, not
      necessarily very precise. However, using a very big number may impact the training speed.
class_docstr_tok: ["A","sampler","to","choose","positive\/negative","samples","from","RCNN","Proposals","Parameters","--","--","--","--","--","num_image",":","int","Number","of","input","images",".","num_proposal",":","int","Number","of","input","proposals",".","num_sample",":","int","Number","of","samples","for","RCNN","targets",".","pos_iou_thresh",":","float","Proposal","whose","IOU","larger","than","``","pos_iou_thresh","``","is","regarded","as","positive","samples",".","Proposal","whose","IOU","smaller","than","``","pos_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",".","max_num_gt",":","int","Maximum","ground-truth","number","for","each","example",".","This","is","only","an","upper","bound",",","not","necessarily","very","precise",".","However",",","using","a","very","big","number","may","impact","the","training","speed","."]
code: def __init__(
      self,
      num_image,
      num_proposal,
      num_sample,
      pos_iou_thresh,
      pos_ratio,
      max_num_gt,
  ):
      super(RCNNTargetSampler, self).__init__()
      self._num_image = num_image
      self._num_proposal = num_proposal
      self._num_sample = num_sample
      self._max_pos = int(round(num_sample * pos_ratio))
      self._pos_iou_thresh = pos_iou_thresh
      self._max_num_gt = max_num_gt
  
file_path: gluon-cv/gluoncv/model_zoo/rcnn/faster_rcnn/rcnn_target.py
imports: from __future__ import absolute_import
  from mxnet import autograd
  from mxnet import gluon
  from ....nn.coder import MultiClassEncoder, NormalizedPerClassBoxCenterEncoder
label_desc: Use image node_id 1 to create a new RCNNTargetSampler object from inherited base classes: gluon with example: obj = RCNNTargetSampler(num_image, num_proposal, num_sample, pos_iou_thresh, pos_ratio, max_num_gt)