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: 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_base_priors * num_classes.
      - bbox_pred (Tensor): Box energies / deltas for a single             scale level, the channels number is num_base_priors * 4.
      - iou_pred (Tensor): Iou for a single scale level, the             channel number is (N, num_base_priors * 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_base_priors","*","num_classes",".","-","bbox_pred","(","Tensor",")",":","Box","energies","\/","deltas","for","a","single","scale","level",",","the","channels","number","is","num_base_priors","*","4",".","-","iou_pred","(","Tensor",")",":","Iou","for","a","single","scale","level",",","the","channel","number","is","(","N",",","num_base_priors","*","1",",","H",",","W",")","."]
code: def forward_single(self, x: Tensor, scale: Scale) -> Sequence[Tensor]:
      """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_base_priors * num_classes.
              - bbox_pred (Tensor): Box energies / deltas for a single \
              scale level, the channels number is num_base_priors * 4.
              - iou_pred (Tensor): Iou for a single scale level, the \
              channel number is (N, num_base_priors * 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()
      iou_pred = self.atss_iou(reg_feat)
      return cls_score, bbox_pred, iou_pred
  
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 5 for calling the DDODHead obj's underlying member method code with example usage: obj.forward_single(x, scale) and returns: cls_score,  bbox_pred,  iou_pred