class_docstr: FCOSR Head, refer to https://arxiv.org/abs/2111.10780 for details 
class_docstr_tok: ["FCOSR","Head",",","refer","to","https",":","\/\/arxiv.org\/abs\/2111.10780","for","details"]
code: def __init__(
      self,
      num_classes=15,
      in_channels=256,
      feat_channels=256,
      stacked_convs=4,
      act="relu",
      fpn_strides=[4, 8, 16, 32, 64],
      trt=False,
      loss_weight={"class": 1.0, "probiou": 1.0},
      norm_cfg={"name": "gn", "num_groups": 32},
      assigner="FCOSRAssigner",
      nms="MultiClassNMS",
  ):
      super(FCOSRHead, self).__init__()
      self.in_channels = in_channels
      self.num_classes = num_classes
      self.fpn_strides = fpn_strides
      self.stacked_convs = stacked_convs
      self.loss_weight = loss_weight
      self.half_pi = paddle.to_tensor(
          [1.5707963267948966], dtype=paddle.float32
      )
      self.probiou_loss = ProbIoULoss(mode="l1")
      act = (
          get_act_fn(act, trt=trt)
          if act is None or isinstance(act, (str, dict))
          else act
      )
      self.trt = trt
      self.loss_weight = loss_weight
      self.assigner = assigner
      self.nms = nms
      # stem
      self.stem_cls = nn.LayerList()
      self.stem_reg = nn.LayerList()
      for i in range(self.stacked_convs):
          self.stem_cls.append(
              ConvBNLayer(
                  self.in_channels[i],
                  feat_channels,
                  filter_size=3,
                  stride=1,
                  padding=1,
                  norm_cfg=norm_cfg,
                  act=act,
              )
          )
          self.stem_reg.append(
              ConvBNLayer(
                  self.in_channels[i],
                  feat_channels,
                  filter_size=3,
                  stride=1,
                  padding=1,
                  norm_cfg=norm_cfg,
                  act=act,
              )
          )
  
      self.scales = nn.LayerList(
          [ScaleReg() for _ in range(len(fpn_strides))]
      )
  
      # prediction
      self.pred_cls = nn.Conv2D(
          feat_channels, self.num_classes, 3, padding=1
      )
  
      self.pred_xy = nn.Conv2D(feat_channels, 2, 3, padding=1)
  
      self.pred_wh = nn.Conv2D(feat_channels, 2, 3, padding=1)
  
      self.pred_angle = nn.Conv2D(feat_channels, 1, 3, padding=1)
  
      self._init_weights()
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from .fcos_head import ScaleReg
  from ..initializer import bias_init_with_prob, constant_, normal_
  from ..ops import get_act_fn, anchor_generator
  from ..rbox_utils import box2corners
  from ..losses import ProbIoULoss
  import numpy
label_desc: Use image node_id 1 to create a new FCOSRHead object from inherited base classes: nn with example: obj = FCOSRHead(num_classes, in_channels, feat_channels, stacked_convs, act, fpn_strides, trt, loss_weight, norm_cfg, assigner, nms)