class_docstr: Bridging the Gap Between Anchor-based and Anchor-free Detection via
  Adaptive Training Sample Selection.
  
  ATSS head structure is similar with FCOS, however ATSS use anchor boxes
  and assign label by Adaptive Training Sample Selection instead max-iou.
  
  https://arxiv.org/abs/1912.02424
class_docstr_tok: ["Bridging","the","Gap","Between","Anchor-based","and","Anchor-free","Detection","via","Adaptive","Training","Sample","Selection",".","ATSS","head","structure","is","similar","with","FCOS",",","however","ATSS","use","anchor","boxes","and","assign","label","by","Adaptive","Training","Sample","Selection","instead","max-iou",".","https",":","\/\/arxiv.org\/abs\/1912.02424"]
docstr: Forward feature of a single scale level.
  
  Args:
      x (Tensor): Features of a single scale level.
      scale (:obj: `mmcv.cnn.Scale`): Learnable scale module to resize
          the bbox prediction.
  
  Returns:
      tuple:
          cls_score (Tensor): Cls scores for a single scale level
              the channels number is num_anchors * num_classes.
          bbox_pred (Tensor): Box energies / deltas for a single scale
              level, the channels number is num_anchors * 4.
          centerness (Tensor): Centerness for a single scale level, the
              channel number is (N, num_anchors * 1, H, W).
docstr_tok: ["Forward","feature","of","a","single","scale","level",".","Args",":","x","(","Tensor",")",":","Features","of","a","single","scale","level",".","scale","(",":","obj",":","`","mmcv.cnn.Scale","`",")",":","Learnable","scale","module","to","resize","the","bbox","prediction",".","Returns",":","tuple",":","cls_score","(","Tensor",")",":","Cls","scores","for","a","single","scale","level","the","channels","number","is","num_anchors","*","num_classes",".","bbox_pred","(","Tensor",")",":","Box","energies","\/","deltas","for","a","single","scale","level",",","the","channels","number","is","num_anchors","*","4.","centerness","(","Tensor",")",":","Centerness","for","a","single","scale","level",",","the","channel","number","is","(","N",",","num_anchors","*","1",",","H",",","W",")","."]
code: def forward_single(self, x, scale):
      """Forward feature of a single scale level.
  
      Args:
          x (Tensor): Features of a single scale level.
          scale (:obj: `mmcv.cnn.Scale`): Learnable scale module to resize
              the bbox prediction.
  
      Returns:
          tuple:
              cls_score (Tensor): Cls scores for a single scale level
                  the channels number is num_anchors * num_classes.
              bbox_pred (Tensor): Box energies / deltas for a single scale
                  level, the channels number is num_anchors * 4.
              centerness (Tensor): Centerness for a single scale level, the
                  channel number is (N, num_anchors * 1, H, W).
      """
      cls_feat = x
      reg_feat = x
      for cls_conv in self.cls_convs:
          cls_feat = cls_conv(cls_feat)
      for reg_conv in self.reg_convs:
          reg_feat = reg_conv(reg_feat)
      cls_score = self.atss_cls(cls_feat)
      # we just follow atss, not apply exp in bbox_pred
      bbox_pred = scale(self.atss_reg(reg_feat)).float()
      centerness = self.atss_centerness(reg_feat)
      return cls_score, bbox_pred, centerness
  
imports: import torch
  import torch.nn
  from mmcv.cnn import ConvModule, Scale, bias_init_with_prob, normal_init
  from mmcv.runner import force_fp32
  from mmdet.core import anchor_inside_flags, build_assigner, build_sampler, images_to_levels, multi_apply, multiclass_nms, reduce_mean, unmap
  from ..builder import HEADS, build_loss
  from .anchor_head import AnchorHead
label_desc: Use image node_id 5 for calling the ATSSHead obj's underlying member method code with example usage: obj.forward_single(x, scale) and returns: cls_score,  bbox_pred,  centerness