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 features from the upstream network.
  
  Args:
      x (tuple[Tensor]): Features from the upstream network, each is
          a 4D-tensor.
  
  Returns:
      tuple: A tuple of classification scores, bbox predictions,
      and iou predictions.
  
      - cls_scores (list[Tensor]): Classification scores for all             scale levels, each is a 4D-tensor, the channels number is             num_base_priors * num_classes.
      - bbox_preds (list[Tensor]): Box energies / deltas for all             scale levels, each is a 4D-tensor, the channels number is             num_base_priors * 4.
      - iou_preds (list[Tensor]): IoU scores for all scale levels,             each is a 4D-tensor, the channels number is num_base_priors * 1.
docstr_tok: ["Forward","features","from","the","upstream","network",".","Args",":","x","(","tuple","[","Tensor","]",")",":","Features","from","the","upstream","network",",","each","is","a","4D-tensor",".","Returns",":","tuple",":","A","tuple","of","classification","scores",",","bbox","predictions",",","and","iou","predictions",".","-","cls_scores","(","list","[","Tensor","]",")",":","Classification","scores","for","all","scale","levels",",","each","is","a","4D-tensor",",","the","channels","number","is","num_base_priors","*","num_classes",".","-","bbox_preds","(","list","[","Tensor","]",")",":","Box","energies","\/","deltas","for","all","scale","levels",",","each","is","a","4D-tensor",",","the","channels","number","is","num_base_priors","*","4",".","-","iou_preds","(","list","[","Tensor","]",")",":","IoU","scores","for","all","scale","levels",",","each","is","a","4D-tensor",",","the","channels","number","is","num_base_priors","*","1","."]
code: def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor]]:
      """Forward features from the upstream network.
  
          Args:
              x (tuple[Tensor]): Features from the upstream network, each is
                  a 4D-tensor.
  
          Returns:
              tuple: A tuple of classification scores, bbox predictions,
              and iou predictions.
  
              - cls_scores (list[Tensor]): Classification scores for all \
              scale levels, each is a 4D-tensor, the channels number is \
              num_base_priors * num_classes.
              - bbox_preds (list[Tensor]): Box energies / deltas for all \
              scale levels, each is a 4D-tensor, the channels number is \
              num_base_priors * 4.
              - iou_preds (list[Tensor]): IoU scores for all scale levels, \
              each is a 4D-tensor, the channels number is num_base_priors * 1.
          """
      return multi_apply(self.forward_single, x, self.scales)
  
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 4 for calling the DDODHead obj's underlying member method code with example usage: obj.forward(x) and returns: multi_apply