class_docstr: Detection Head of `DDOD <https://arxiv.org/abs/2107.02963>`_.
  
  DDOD head decomposes conjunctions lying in most current one-stage
  detectors via label assignment disentanglement, spatial feature
  disentanglement, and pyramid supervision disentanglement.
  
  Args:
      num_classes (int): Number of categories excluding the
          background category.
      in_channels (int): Number of channels in the input feature map.
      stacked_convs (int): The number of stacked Conv. Defaults to 4.
      conv_cfg (:obj:`ConfigDict` or dict, optional): Config dict for
          convolution layer. Defaults to None.
      use_dcn (bool): Use dcn, Same as ATSS when False. Defaults to True.
      norm_cfg (:obj:`ConfigDict` or dict): Normal config of ddod head.
          Defaults to dict(type='GN', num_groups=32, requires_grad=True).
      loss_iou (:obj:`ConfigDict` or dict): Config of IoU loss. Defaults to
          dict(type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0).
docstr: Initialize layers of the head.
docstr_tok: ["Initialize","layers","of","the","head","."]
code: def _init_layers(self) -> None:
      """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=dict(type="DCN", deform_groups=1)
                  if i == 0 and self.use_dcn
                  else self.conv_cfg,
                  norm_cfg=self.norm_cfg,
              )
          )
          self.reg_convs.append(
              ConvModule(
                  chn,
                  self.feat_channels,
                  3,
                  stride=1,
                  padding=1,
                  conv_cfg=dict(type="DCN", deform_groups=1)
                  if i == 0 and self.use_dcn
                  else self.conv_cfg,
                  norm_cfg=self.norm_cfg,
              )
          )
      self.atss_cls = nn.Conv2d(
          self.feat_channels,
          self.num_base_priors * self.cls_out_channels,
          3,
          padding=1,
      )
      self.atss_reg = nn.Conv2d(
          self.feat_channels, self.num_base_priors * 4, 3, padding=1
      )
      self.atss_iou = nn.Conv2d(
          self.feat_channels, self.num_base_priors * 1, 3, padding=1
      )
      self.scales = nn.ModuleList(
          [Scale(1.0) for _ in self.prior_generator.strides]
      )
  
      # we use the global list in loss
      self.cls_num_pos_samples_per_level = [
          0.0 for _ in range(len(self.prior_generator.strides))
      ]
      self.reg_num_pos_samples_per_level = [
          0.0 for _ in range(len(self.prior_generator.strides))
      ]
  
imports: from typing import List, Optional, Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, Scale
  from mmengine.model import bias_init_with_prob, normal_init
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures.bbox import bbox_overlaps
  from mmdet.utils import ConfigType, InstanceList, 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 2 for calling the DDODHead obj's underlying member method code with example usage: obj._init_layers() without return types