class_docstr: Region Proposal Network
  
  Args:
      anchor_generator (dict): configure of anchor generation
      rpn_target_assign (dict): configure of rpn targets assignment
      train_proposal (dict): configure of proposals generation
          at the stage of training
      test_proposal (dict): configure of proposals generation
          at the stage of prediction
      in_channel (int): channel of input feature maps which can be
          derived by from_config
class_docstr_tok: ["Region","Proposal","Network","Args",":","anchor_generator","(","dict",")",":","configure","of","anchor","generation","rpn_target_assign","(","dict",")",":","configure","of","rpn","targets","assignment","train_proposal","(","dict",")",":","configure","of","proposals","generation","at","the","stage","of","training","test_proposal","(","dict",")",":","configure","of","proposals","generation","at","the","stage","of","prediction","in_channel","(","int",")",":","channel","of","input","feature","maps","which","can","be","derived","by","from_config"]
code: def forward(self, feats, inputs):
      rpn_feats = self.rpn_feat(feats)
      scores = []
      deltas = []
  
      for rpn_feat in rpn_feats:
          rrs = self.rpn_rois_score(rpn_feat)
          rrd = self.rpn_rois_delta(rpn_feat)
          scores.append(rrs)
          deltas.append(rrd)
  
      anchors = self.anchor_generator(rpn_feats)
  
      rois, rois_num = self._gen_proposal(
          scores, deltas, anchors, inputs
      )
      if self.training:
          loss = self.get_loss(scores, deltas, anchors, inputs)
          return rois, rois_num, loss
      else:
          return rois, rois_num, None
  
file_path: PaddleDetection/ppdet/modeling/proposal_generator/rpn_head.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import Normal
  from ppdet.core.workspace import register
  from .anchor_generator import AnchorGenerator
  from .target_layer import RPNTargetAssign
  from .proposal_generator import ProposalGenerator
  from ..cls_utils import _get_class_default_kwargs
label_desc: Use image node_id 3 for calling the RPNHead obj's underlying member method code with example usage: obj.forward(feats, inputs) and returns: rois,  rois_num,  loss, rois,  rois_num,  None