docstr: body_feats (list[Tensor]): Multi-level backbone features
  rois (list[Tensor]): Proposals for each batch with shape [N, 4]
  rois_num (Tensor): The number of proposals for each batch
  inputs (dict): ground truth info
docstr_tok: ["body_feats","(","list","[","Tensor","]",")",":","Multi-level","backbone","features","rois","(","list","[","Tensor","]",")",":","Proposals","for","each","batch","with","shape","[","N",",","4","]","rois_num","(","Tensor",")",":","The","number","of","proposals","for","each","batch","inputs","(","dict",")",":","ground","truth","info"]
code: def forward_train(
      self, body_feats, rois, rois_num, inputs, targets, bbox_feat
  ):
      """
      body_feats (list[Tensor]): Multi-level backbone features
      rois (list[Tensor]): Proposals for each batch with shape [N, 4]
      rois_num (Tensor): The number of proposals for each batch
      inputs (dict): ground truth info
      """
      tgt_labels, _, tgt_gt_inds = targets
      (
          rois,
          rois_num,
          tgt_classes,
          tgt_masks,
          mask_index,
          tgt_weights,
      ) = self.mask_assigner(rois, tgt_labels, tgt_gt_inds, inputs)
  
      if self.share_bbox_feat:
          rois_feat = paddle.gather(bbox_feat, mask_index)
      else:
          rois_feat = self.roi_extractor(body_feats, rois, rois_num)
      mask_feat = self.head(rois_feat)
      mask_logits = self.mask_fcn_logits(mask_feat)
  
      loss_mask = self.get_loss(
          mask_logits, tgt_classes, tgt_masks, tgt_weights
      )
      return {"loss_mask": loss_mask}
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import KaimingNormal
  from ppdet.core.workspace import register, create
  from ppdet.modeling.layers import ConvNormLayer
  from .roi_extractor import RoIAlign
  from ..cls_utils import _get_class_default_kwargs
label_desc: Use image node_id 4 for calling the MaskHead obj's underlying member method code with example usage: obj.forward_train(body_feats, rois, rois_num, inputs, targets, bbox_feat) and returns: dict