class_docstr: RPN Head that supports FPN input
  
  Args:
      anchor_generator (object): `AnchorGenerator` instance
      rpn_target_assign (object): `RPNTargetAssign` instance
      train_proposal (object): `GenerateProposals` instance for training
      test_proposal (object): `GenerateProposals` instance for testing
      anchor_start_size (int): size of anchor at the first scale
      num_chan (int): number of FPN output channels
      min_level (int): lowest level of FPN output
      max_level (int): highest level of FPN output
      num_classes (int): number of classes in rpn output
docstr: Get proposals in one level according to the output of fpn rpn head
  
  Args:
      body_feat(Variable): the feature map from backone.
      im_info(Variable): The information of image with shape [N, 3] with
          format (height, width, scale).
      feat_lvl(int): Indicate the level of proposals corresponding to
          the feature maps.
  
  Returns:
      rpn_rois_fpn(Variable): Output proposals with shape of (rois_num, 4).
      rpn_roi_probs_fpn(Variable): Scores of proposals with
          shape of (rois_num, 1).
docstr_tok: ["Get","proposals","in","one","level","according","to","the","output","of","fpn","rpn","head","Args",":","body_feat","(","Variable",")",":","the","feature","map","from","backone",".","im_info","(","Variable",")",":","The","information","of","image","with","shape","[","N",",","3","]","with","format","(","height",",","width",",","scale",")",".","feat_lvl","(","int",")",":","Indicate","the","level","of","proposals","corresponding","to","the","feature","maps",".","Returns",":","rpn_rois_fpn","(","Variable",")",":","Output","proposals","with","shape","of","(","rois_num",",","4",")",".","rpn_roi_probs_fpn","(","Variable",")",":","Scores","of","proposals","with","shape","of","(","rois_num",",","1",")","."]
code: def _get_single_proposals(
      self, body_feat, im_info, feat_lvl, mode="train"
  ):
      """
      Get proposals in one level according to the output of fpn rpn head
  
      Args:
          body_feat(Variable): the feature map from backone.
          im_info(Variable): The information of image with shape [N, 3] with
              format (height, width, scale).
          feat_lvl(int): Indicate the level of proposals corresponding to
              the feature maps.
  
      Returns:
          rpn_rois_fpn(Variable): Output proposals with shape of (rois_num, 4).
          rpn_roi_probs_fpn(Variable): Scores of proposals with
              shape of (rois_num, 1).
      """
  
      rpn_cls_score_fpn, rpn_bbox_pred_fpn = self._get_output(
          body_feat, feat_lvl
      )
  
      prop_op = (
          self.train_proposal if mode == "train" else self.test_proposal
      )
      if self.num_classes == 1:
          rpn_cls_prob_fpn = fluid.layers.sigmoid(
              rpn_cls_score_fpn, name="rpn_cls_prob_fpn" + str(feat_lvl)
          )
      else:
          rpn_cls_score_fpn = fluid.layers.transpose(
              rpn_cls_score_fpn, perm=[0, 2, 3, 1]
          )
          rpn_cls_score_fpn = fluid.layers.reshape(
              rpn_cls_score_fpn, shape=(0, 0, 0, -1, self.num_classes)
          )
          rpn_cls_prob_fpn = fluid.layers.softmax(
              rpn_cls_score_fpn,
              use_cudnn=False,
              name="rpn_cls_prob_fpn" + str(feat_lvl),
          )
          rpn_cls_prob_fpn = fluid.layers.slice(
              rpn_cls_prob_fpn,
              axes=[4],
              starts=[1],
              ends=[self.num_classes],
          )
          rpn_cls_prob_fpn, _ = fluid.layers.topk(rpn_cls_prob_fpn, 1)
          rpn_cls_prob_fpn = fluid.layers.reshape(
              rpn_cls_prob_fpn, shape=(0, 0, 0, -1)
          )
          rpn_cls_prob_fpn = fluid.layers.transpose(
              rpn_cls_prob_fpn, perm=[0, 3, 1, 2]
          )
      # prop_op
      rpn_rois_fpn, rpn_roi_prob_fpn = fluid.layers.generate_proposals(
          scores=rpn_cls_prob_fpn,
          bbox_deltas=rpn_bbox_pred_fpn,
          im_info=im_info,
          anchors=self.anchors,
          variances=self.anchor_var,
          pre_nms_top_n=prop_op.pre_nms_top_n,
          post_nms_top_n=prop_op.post_nms_top_n,
          nms_thresh=prop_op.nms_thresh,
          min_size=prop_op.min_size,
          eta=prop_op.eta,
      )
      return rpn_rois_fpn, rpn_roi_prob_fpn
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from paddle import fluid
  from paddle.fluid.param_attr import ParamAttr
  from paddle.fluid.initializer import Normal
  from paddle.fluid.regularizer import L2Decay
label_desc: Use image node_id 3 for calling the FPNRPNHead obj's underlying member method code with example usage: obj._get_single_proposals(body_feat, im_info, feat_lvl, mode) and returns: rpn_rois_fpn,  rpn_roi_prob_fpn