class_docstr: Decoder of DAB-DETR.
  
  Args:
      query_dim (int): The last dimension of query pos,
          4 for anchor format, 2 for point format.
          Defaults to 4.
      query_scale_type (str): Type of transformation applied
          to content query. Defaults to `cond_elewise`.
      with_modulated_hw_attn (bool): Whether to inject h&w info
          during cross conditional attention. Defaults to True.
code: def __init__(
      self,
      *args,
      query_dim: int = 4,
      query_scale_type: str = "cond_elewise",
      with_modulated_hw_attn: bool = True,
      **kwargs,
  ):
      self.query_dim = query_dim
      self.query_scale_type = query_scale_type
      self.with_modulated_hw_attn = with_modulated_hw_attn
  
      super().__init__(*args, **kwargs)
  
imports: from typing import List
  import torch
  import torch.nn
  from mmcv.cnn import build_norm_layer
  from mmcv.cnn.bricks.transformer import FFN
  from mmengine.model import ModuleList
  from torch import Tensor
  from .detr_layers import DetrTransformerDecoder, DetrTransformerDecoderLayer, DetrTransformerEncoder, DetrTransformerEncoderLayer
  from .utils import MLP, ConditionalAttention, coordinate_to_encoding, inverse_sigmoid
label_desc: Use image node_id 1 to create a new DABDetrTransformerDecoder object from inherited base classes: DetrTransformerDecoder with example: obj = DABDetrTransformerDecoder()