class_docstr: RCNN target encoder to generate matching target and regression target values.
  
  Parameters
  ----------
  num_class : int
      Number of total number of positive classes.
  max_pos : int, default is 128
      Upper bound of Number of positive samples.
  per_device_batch_size : int, default is 1
      Per device batch size
  means : iterable of float, default is (0., 0., 0., 0.)
      Mean values to be subtracted from regression targets.
  stds : iterable of float, default is (.1, .1, .2, .2)
      Standard deviations to be divided from regression targets.
class_docstr_tok: ["RCNN","target","encoder","to","generate","matching","target","and","regression","target","values",".","Parameters","--","--","--","--","--","num_class",":","int","Number","of","total","number","of","positive","classes",".","max_pos",":","int",",","default","is","128","Upper","bound","of","Number","of","positive","samples",".","per_device_batch_size",":","int",",","default","is","1","Per","device","batch","size","means",":","iterable","of","float",",","default","is","(","0.",",","0.",",","0.",",","0",".",")","Mean","values","to","be","subtracted","from","regression","targets",".","stds",":","iterable","of","float",",","default","is","(",".1",",",".1",",",".2",",",".2",")","Standard","deviations","to","be","divided","from","regression","targets","."]
docstr: Components can handle batch images
  
  Parameters
  ----------
  roi: (B, N, 4), input proposals
  samples: (B, N), value +1: positive / -1: negative.
  matches: (B, N), value [0, M), index to gt_label and gt_box.
  gt_label: (B, M), value [0, num_class), excluding background class.
  gt_box: (B, M, 4), input ground truth box corner coordinates.
  
  Returns
  -------
  cls_target: (B, N), value [0, num_class + 1), including background.
  box_target: (B, N, C, 4), only foreground class has nonzero target.
  box_weight: (B, N, C, 4), only foreground class has nonzero weight.
docstr_tok: ["Components","can","handle","batch","images","Parameters","--","--","--","--","--","roi",":","(","B",",","N",",","4",")",",","input","proposals","samples",":","(","B",",","N",")",",","value","+1",":","positive","\/","-1",":","negative",".","matches",":","(","B",",","N",")",",","value","[","0",",","M",")",",","index","to","gt_label","and","gt_box",".","gt_label",":","(","B",",","M",")",",","value","[","0",",","num_class",")",",","excluding","background","class",".","gt_box",":","(","B",",","M",",","4",")",",","input","ground","truth","box","corner","coordinates",".","Returns","--","--","--","-","cls_target",":","(","B",",","N",")",",","value","[","0",",","num_class","+","1",")",",","including","background",".","box_target",":","(","B",",","N",",","C",",","4",")",",","only","foreground","class","has","nonzero","target",".","box_weight",":","(","B",",","N",",","C",",","4",")",",","only","foreground","class","has","nonzero","weight","."]
code: def hybrid_forward(self, F, roi, samples, matches, gt_label, gt_box):
      """Components can handle batch images
  
      Parameters
      ----------
      roi: (B, N, 4), input proposals
      samples: (B, N), value +1: positive / -1: negative.
      matches: (B, N), value [0, M), index to gt_label and gt_box.
      gt_label: (B, M), value [0, num_class), excluding background class.
      gt_box: (B, M, 4), input ground truth box corner coordinates.
  
      Returns
      -------
      cls_target: (B, N), value [0, num_class + 1), including background.
      box_target: (B, N, C, 4), only foreground class has nonzero target.
      box_weight: (B, N, C, 4), only foreground class has nonzero weight.
  
      """
      with autograd.pause():
          # cls_target (B, N)
          cls_target = self._cls_encoder(samples, matches, gt_label)
          # box_target, box_weight (C, B, N, 4)
          box_target, box_mask, indices = self._box_encoder(
              samples, matches, roi, gt_label, gt_box
          )
  
      return cls_target, box_target, box_mask, indices
  
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 2 for calling the RCNNTargetGenerator obj's underlying member method code with example usage: obj.hybrid_forward(F, roi, samples, matches, gt_label, gt_box) and returns: cls_target,  box_target,  box_mask,  indices