class_docstr: PicoHeadV2
  Args:
      conv_feat (object): Instance of 'PicoFeat'
      num_classes (int): Number of classes
      fpn_stride (list): The stride of each FPN Layer
      prior_prob (float): Used to set the bias init for the class prediction layer
      loss_class (object): Instance of VariFocalLoss.
      loss_dfl (object): Instance of DistributionFocalLoss.
      loss_bbox (object): Instance of bbox loss.
      assigner (object): Instance of label assigner.
      reg_max: Max value of integral set :math: `{0, ..., reg_max}`
              n QFL setting. Default: 7.
class_docstr_tok: ["PicoHeadV2","Args",":","conv_feat","(","object",")",":","Instance","of","'PicoFeat'","num_classes","(","int",")",":","Number","of","classes","fpn_stride","(","list",")",":","The","stride","of","each","FPN","Layer","prior_prob","(","float",")",":","Used","to","set","the","bias","init","for","the","class","prediction","layer","loss_class","(","object",")",":","Instance","of","VariFocalLoss",".","loss_dfl","(","object",")",":","Instance","of","DistributionFocalLoss",".","loss_bbox","(","object",")",":","Instance","of","bbox","loss",".","assigner","(","object",")",":","Instance","of","label","assigner",".","reg_max",":","Max","value","of","integral","set",":","math",":","`","{","0",",","...",",","reg_max","}","`","n","QFL","setting",".","Default",":","7","."]
code: def forward_train(self, fpn_feats):
      cls_score_list, reg_list, box_list = [], [], []
      for i, (fpn_feat, stride) in enumerate(
          zip(fpn_feats, self.fpn_stride)
      ):
          b, _, h, w = get_static_shape(fpn_feat)
          # task decomposition
          conv_cls_feat, se_feat = self.conv_feat(fpn_feat, i)
          cls_logit = self.head_cls_list[i](se_feat)
          reg_pred = self.head_reg_list[i](se_feat)
  
          # cls prediction and alignment
          if self.use_align_head:
              cls_prob = F.sigmoid(self.cls_align[i](conv_cls_feat))
              cls_score = (F.sigmoid(cls_logit) * cls_prob + eps).sqrt()
          else:
              cls_score = F.sigmoid(cls_logit)
  
          cls_score_out = cls_score.transpose([0, 2, 3, 1])
          bbox_pred = reg_pred.transpose([0, 2, 3, 1])
          b, cell_h, cell_w, _ = paddle.shape(cls_score_out)
          y, x = self.get_single_level_center_point(
              [cell_h, cell_w], stride, cell_offset=self.cell_offset
          )
          center_points = paddle.stack([x, y], axis=-1)
          cls_score_out = cls_score_out.reshape(
              [b, -1, self.cls_out_channels]
          )
          bbox_pred = self.distribution_project(bbox_pred) * stride
          bbox_pred = bbox_pred.reshape([b, cell_h * cell_w, 4])
          bbox_pred = batch_distance2bbox(
              center_points, bbox_pred, max_shapes=None
          )
          cls_score_list.append(
              cls_score.flatten(2).transpose([0, 2, 1])
          )
          reg_list.append(reg_pred.flatten(2).transpose([0, 2, 1]))
          box_list.append(bbox_pred / stride)
  
      cls_score_list = paddle.concat(cls_score_list, axis=1)
      box_list = paddle.concat(box_list, axis=1)
      reg_list = paddle.concat(reg_list, axis=1)
      return cls_score_list, reg_list, box_list, fpn_feats
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.nn.initializer import Normal, Constant
  from ppdet.modeling.ops import get_static_shape
  from ..initializer import normal_
  from ..assigners.utils import generate_anchors_for_grid_cell
  from ..bbox_utils import bbox_center, batch_distance2bbox, bbox2distance
  from ppdet.core.workspace import register
  from ppdet.modeling.layers import ConvNormLayer
  from .simota_head import OTAVFLHead
  from .gfl_head import Integral, GFLHead
  from ppdet.modeling.necks.csp_pan import DPModule
label_desc: Use image node_id 3 for calling the PicoHeadV2 obj's underlying member method code with example usage: obj.forward_train(fpn_feats) and returns: cls_score_list,  reg_list,  box_list,  fpn_feats