class_docstr: Faster R-CNN network, see https://arxiv.org/abs/1506.01497
  
  Args:
      backbone (object): backbone instance
      rpn_head (object): `RPNHead` instance
      bbox_head (object): `BBoxHead` instance
      bbox_post_process (object): `BBoxPostProcess` instance
      neck (object): 'FPN' instance
class_docstr_tok: ["Faster","R-CNN","network",",","see","https",":","\/\/arxiv.org\/abs\/1506.01497","Args",":","backbone","(","object",")",":","backbone","instance","rpn_head","(","object",")",":","`","RPNHead","`","instance","bbox_head","(","object",")",":","`","BBoxHead","`","instance","bbox_post_process","(","object",")",":","`","BBoxPostProcess","`","instance","neck","(","object",")",":","'FPN","'","instance"]
code: def _forward(self):
      body_feats = self.backbone(self.inputs)
      if self.neck is not None:
          body_feats = self.neck(body_feats)
      if self.training:
          rois, rois_num, rpn_loss = self.rpn_head(
              body_feats, self.inputs
          )
          bbox_loss, _ = self.bbox_head(
              body_feats, rois, rois_num, self.inputs
          )
          return rpn_loss, bbox_loss
      else:
          rois, rois_num, _ = self.rpn_head(body_feats, self.inputs)
          preds, _ = self.bbox_head(body_feats, rois, rois_num, None)
          im_shape = self.inputs["im_shape"]
          scale_factor = self.inputs["scale_factor"]
          bbox, bbox_num, nms_keep_idx = self.bbox_post_process(
              preds, (rois, rois_num), im_shape, scale_factor
          )
  
          # rescale the prediction back to origin image
          bboxes, bbox_pred, bbox_num = self.bbox_post_process.get_pred(
              bbox, bbox_num, im_shape, scale_factor
          )
  
          if self.use_extra_data:
              extra_data = (
                  {}
              )  # record the bbox output before nms, such like scores and nms_keep_idx
              """extra_data:{
                              'scores': predict scores,
                              'nms_keep_idx': bbox index before nms,
                             }
                  """
              extra_data["scores"] = preds[
                  1
              ]  # predict scores (probability)
              # Todo: get logits output
              extra_data[
                  "nms_keep_idx"
              ] = nms_keep_idx  # bbox index before nms
              return bbox_pred, bbox_num, extra_data
          else:
              return bbox_pred, bbox_num
  
file_path: PaddleDetection/ppdet/modeling/architectures/faster_rcnn.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from ppdet.core.workspace import register, create
  from .meta_arch import BaseArch
  import numpy
label_desc: Use image node_id 4 for calling the FasterRCNN obj's underlying member method code with example usage: obj._forward() and returns: rpn_loss,  bbox_loss, bbox_pred,  bbox_num,  extra_data, bbox_pred,  bbox_num