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: Initialize layers of the head.
docstr_tok: ["Initialize","layers","of","the","head","."]
code: def _init_layers(self):
      """Initialize layers of the head."""
      self.relu = nn.ReLU(inplace=True)
      self.cls_convs = nn.ModuleList()
      self.reg_convs = nn.ModuleList()
      for i in range(self.stacked_convs):
          chn = self.in_channels if i == 0 else self.feat_channels
          self.cls_convs.append(
              ConvModule(
                  chn,
                  self.feat_channels,
                  3,
                  stride=1,
                  padding=1,
                  conv_cfg=self.conv_cfg,
                  norm_cfg=self.norm_cfg,
              )
          )
          self.reg_convs.append(
              ConvModule(
                  chn,
                  self.feat_channels,
                  3,
                  stride=1,
                  padding=1,
                  conv_cfg=self.conv_cfg,
                  norm_cfg=self.norm_cfg,
              )
          )
      self.atss_cls = nn.Conv2d(
          self.feat_channels,
          self.num_anchors * self.cls_out_channels,
          3,
          padding=1,
      )
      self.atss_reg = nn.Conv2d(
          self.feat_channels, self.num_anchors * 4, 3, padding=1
      )
      self.atss_centerness = nn.Conv2d(
          self.feat_channels, self.num_anchors * 1, 3, padding=1
      )
      self.scales = nn.ModuleList(
          [Scale(1.0) for _ in self.anchor_generator.strides]
      )
  
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 2 for calling the ATSSHead obj's underlying member method code with example usage: obj._init_layers() without return types