class_docstr: Used in RetinaNet proposed in paper https://arxiv.org/pdf/1708.02002.pdf
      
class_docstr_tok: ["Used","in","RetinaNet","proposed","in","paper","https",":","\/\/arxiv.org\/pdf\/1708.02002.pdf"]
code: def __init__(
      self,
      num_classes=80,
      conv_feat="RetinaFeat",
      anchor_generator="RetinaAnchorGenerator",
      bbox_assigner="MaxIoUAssigner",
      loss_class="FocalLoss",
      loss_bbox="SmoothL1Loss",
      nms="MultiClassNMS",
      prior_prob=0.01,
      nms_pre=1000,
      weights=[1.0, 1.0, 1.0, 1.0],
  ):
      super(RetinaHead, self).__init__()
      self.num_classes = num_classes
      self.conv_feat = conv_feat
      self.anchor_generator = anchor_generator
      self.bbox_assigner = bbox_assigner
      self.loss_class = loss_class
      self.loss_bbox = loss_bbox
      self.nms = nms
      self.nms_pre = nms_pre
      self.weights = weights
  
      bias_init_value = -math.log((1 - prior_prob) / prior_prob)
      num_anchors = self.anchor_generator.num_anchors
      self.retina_cls = nn.Conv2D(
          in_channels=self.conv_feat.feat_out,
          out_channels=self.num_classes * num_anchors,
          kernel_size=3,
          stride=1,
          padding=1,
          weight_attr=ParamAttr(initializer=Normal(mean=0.0, std=0.01)),
          bias_attr=ParamAttr(
              initializer=Constant(value=bias_init_value)
          ),
      )
      self.retina_reg = nn.Conv2D(
          in_channels=self.conv_feat.feat_out,
          out_channels=4 * num_anchors,
          kernel_size=3,
          stride=1,
          padding=1,
          weight_attr=ParamAttr(initializer=Normal(mean=0.0, std=0.01)),
          bias_attr=ParamAttr(initializer=Constant(value=0)),
      )
  
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.modeling.bbox_utils import bbox2delta, delta2bbox
  from ppdet.modeling.heads.fcos_head import FCOSFeat
  from ppdet.core.workspace import register
label_desc: Use image node_id 1 to create a new RetinaHead object from inherited base classes: nn with example: obj = RetinaHead(num_classes, conv_feat, anchor_generator, bbox_assigner, loss_class, loss_bbox, nms, prior_prob, nms_pre, weights)