class_docstr: FCOSHead
  Args:
      num_classes (int): Number of classes
      fcos_feat (object): Instance of 'FCOSFeat'
      fpn_stride (list): The stride of each FPN Layer
      prior_prob (float): Used to set the bias init for the class prediction layer
      norm_reg_targets (bool): Normalization the regression target if true
      centerness_on_reg (bool): The prediction of centerness on regression or clssification branch
      num_shift (float): Relative offset between the center of the first shift and the top-left corner of img
      fcos_loss (object): Instance of 'FCOSLoss'
      nms (object): Instance of 'MultiClassNMS'
      trt (bool): Whether to use trt in nms of deploy
code: def forward(self, fpn_feats, targets=None):
      assert len(fpn_feats) == len(
          self.fpn_stride
      ), "The size of fpn_feats is not equal to size of fpn_stride"
      cls_logits_list = []
      bboxes_reg_list = []
      centerness_list = []
      for scale_reg, fpn_stride, fpn_feat in zip(
          self.scales_regs, self.fpn_stride, fpn_feats
      ):
          fcos_cls_feat, fcos_reg_feat = self.fcos_feat(fpn_feat)
          cls_logits = self.fcos_head_cls(fcos_cls_feat)
          bbox_reg = scale_reg(self.fcos_head_reg(fcos_reg_feat))
          if self.centerness_on_reg:
              centerness = self.fcos_head_centerness(fcos_reg_feat)
          else:
              centerness = self.fcos_head_centerness(fcos_cls_feat)
          if self.norm_reg_targets:
              bbox_reg = F.relu(bbox_reg)
              if self.multiply_strides_reg_targets:
                  bbox_reg = bbox_reg * fpn_stride
              else:
                  if (
                      not self.training
                      or targets.get("get_data", False)
                      or targets.get("is_teacher", False)
                  ):
                      bbox_reg = bbox_reg * fpn_stride
          else:
              bbox_reg = paddle.exp(bbox_reg)
          cls_logits_list.append(cls_logits)
          bboxes_reg_list.append(bbox_reg)
          centerness_list.append(centerness)
  
      if targets is not None:
          self.is_teacher = targets.get("is_teacher", False)
          if self.is_teacher:
              return [cls_logits_list, bboxes_reg_list, centerness_list]
  
      if self.training and targets is not None:
          get_data = targets.get("get_data", False)
          if get_data:
              return [cls_logits_list, bboxes_reg_list, centerness_list]
  
          losses = {}
          fcos_head_outs = [
              cls_logits_list,
              bboxes_reg_list,
              centerness_list,
          ]
          losses_fcos = self.get_loss(fcos_head_outs, targets)
          losses.update(losses_fcos)
  
          total_loss = paddle.add_n(list(losses.values()))
          losses.update({"loss": total_loss})
          return losses
      else:
          # eval or infer
          locations_list = []
          for fpn_stride, feature in zip(self.fpn_stride, fpn_feats):
              location = self._compute_locations_by_level(
                  fpn_stride, feature, self.num_shift
              )
              locations_list.append(location)
  
          fcos_head_outs = [
              locations_list,
              cls_logits_list,
              bboxes_reg_list,
              centerness_list,
          ]
          return fcos_head_outs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.nn.initializer import Normal, Constant
  from ppdet.core.workspace import register
  from ppdet.modeling.layers import ConvNormLayer, MultiClassNMS
label_desc: Use image node_id 3 for calling the FCOSHead obj's underlying member method code with example usage: obj.forward(fpn_feats, targets) and returns: losses, fcos_head_outs, list, list