class_docstr: Detection Head of `ATSS <https://arxiv.org/abs/1912.02424>`_.
  
  ATSS head structure is similar with FCOS, however ATSS use anchor boxes
  and assign label by Adaptive Training Sample Selection instead max-iou.
  
  Args:
      num_classes (int): Number of categories excluding the background
          category.
      in_channels (int): Number of channels in the input feature map.
      pred_kernel_size (int): Kernel size of ``nn.Conv2d``
      stacked_convs (int): Number of stacking convs of the head.
      conv_cfg (:obj:`ConfigDict` or dict, optional): Config dict for
          convolution layer. Defaults to None.
      norm_cfg (:obj:`ConfigDict` or dict): Config dict for normalization
          layer. Defaults to ``dict(type='GN', num_groups=32,
          requires_grad=True)``.
      reg_decoded_bbox (bool): If true, the regression loss would be
          applied directly on decoded bounding boxes, converting both
          the predicted boxes and regression targets to absolute
          coordinates format. Defaults to False. It should be `True` when
          using `IoULoss`, `GIoULoss`, or `DIoULoss` in the bbox head.
      loss_centerness (:obj:`ConfigDict` or dict): Config of centerness loss.
          Defaults to ``dict(type='CrossEntropyLoss', use_sigmoid=True,
          loss_weight=1.0)``.
      init_cfg (:obj:`ConfigDict` or dict or list[dict] or
          list[:obj:`ConfigDict`]): Initialization config dict.
docstr: Get the number of valid anchors in every level.
docstr_tok: ["Get","the","number","of","valid","anchors","in","every","level","."]
code: def get_num_level_anchors_inside(
      self, num_level_anchors, inside_flags
  ):
      """Get the number of valid anchors in every level."""
  
      split_inside_flags = torch.split(inside_flags, num_level_anchors)
      num_level_anchors_inside = [
          int(flags.sum()) for flags in split_inside_flags
      ]
      return num_level_anchors_inside
  
imports: from typing import List, Optional, Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, Scale
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, InstanceList, MultiConfig, OptConfigType, OptInstanceList, reduce_mean
  from ..task_modules.prior_generators import anchor_inside_flags
  from ..utils import images_to_levels, multi_apply, unmap
  from .anchor_head import AnchorHead
label_desc: Use image node_id 10 for calling the ATSSHead obj's underlying member method code with example usage: obj.get_num_level_anchors_inside(num_level_anchors, inside_flags) and returns: num_level_anchors_inside