code: def __init__(
      self,
      num_classes=80,
      hidden_dim=256,
      num_queries=300,
      position_embed_type="sine",
      backbone_feat_channels=[512, 1024, 2048],
      feat_strides=[8, 16, 32],
      num_levels=3,
      num_decoder_points=4,
      nhead=8,
      num_decoder_layers=6,
      dim_feedforward=1024,
      dropout=0.0,
      activation="relu",
      num_denoising=100,
      label_noise_ratio=0.5,
      box_noise_scale=1.0,
      learnt_init_query=True,
      query_pos_head_inv_sig=False,
      eval_size=None,
      eval_idx=-1,
      eps=1e-2,
  ):
      super(RTDETRTransformer, self).__init__()
      assert position_embed_type in [
          "sine",
          "learned",
      ], f"ValueError: position_embed_type not supported {position_embed_type}!"
      assert len(backbone_feat_channels) <= num_levels
      assert len(feat_strides) == len(backbone_feat_channels)
      for _ in range(num_levels - len(feat_strides)):
          feat_strides.append(feat_strides[-1] * 2)
  
      self.hidden_dim = hidden_dim
      self.nhead = nhead
      self.feat_strides = feat_strides
      self.num_levels = num_levels
      self.num_classes = num_classes
      self.num_queries = num_queries
      self.eps = eps
      self.num_decoder_layers = num_decoder_layers
      self.eval_size = eval_size
  
      # backbone feature projection
      self._build_input_proj_layer(backbone_feat_channels)
  
      # Transformer module
      decoder_layer = TransformerDecoderLayer(
          hidden_dim,
          nhead,
          dim_feedforward,
          dropout,
          activation,
          num_levels,
          num_decoder_points,
      )
      self.decoder = TransformerDecoder(
          hidden_dim, decoder_layer, num_decoder_layers, eval_idx
      )
  
      # denoising part
      self.denoising_class_embed = nn.Embedding(
          num_classes,
          hidden_dim,
          weight_attr=ParamAttr(initializer=nn.initializer.Normal()),
      )
      self.num_denoising = num_denoising
      self.label_noise_ratio = label_noise_ratio
      self.box_noise_scale = box_noise_scale
  
      # decoder embedding
      self.learnt_init_query = learnt_init_query
      if learnt_init_query:
          self.tgt_embed = nn.Embedding(num_queries, hidden_dim)
      self.query_pos_head = MLP(
          4, 2 * hidden_dim, hidden_dim, num_layers=2
      )
      self.query_pos_head_inv_sig = query_pos_head_inv_sig
  
      # encoder head
      self.enc_output = nn.Sequential(
          nn.Linear(hidden_dim, hidden_dim),
          nn.LayerNorm(
              hidden_dim,
              weight_attr=ParamAttr(regularizer=L2Decay(0.0)),
              bias_attr=ParamAttr(regularizer=L2Decay(0.0)),
          ),
      )
      self.enc_score_head = nn.Linear(hidden_dim, num_classes)
      self.enc_bbox_head = MLP(hidden_dim, hidden_dim, 4, num_layers=3)
  
      # decoder head
      self.dec_score_head = nn.LayerList(
          [
              nn.Linear(hidden_dim, num_classes)
              for _ in range(num_decoder_layers)
          ]
      )
      self.dec_bbox_head = nn.LayerList(
          [
              MLP(hidden_dim, hidden_dim, 4, num_layers=3)
              for _ in range(num_decoder_layers)
          ]
      )
  
      self._reset_parameters()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register
  from ..layers import MultiHeadAttention
  from ..heads.detr_head import MLP
  from .deformable_transformer import MSDeformableAttention
  from ..initializer import linear_init_, constant_, xavier_uniform_, normal_, bias_init_with_prob
  from .utils import _get_clones, get_sine_pos_embed, get_contrastive_denoising_training_group, inverse_sigmoid
label_desc: Use image node_id 1 to create a new RTDETRTransformer object from inherited base classes: nn with example: obj = RTDETRTransformer(num_classes, hidden_dim, num_queries, position_embed_type, backbone_feat_channels, feat_strides, num_levels, num_decoder_points, nhead, num_decoder_layers, dim_feedforward, dropout, activation, num_denoising, label_noise_ratio, box_noise_scale, learnt_init_query, query_pos_head_inv_sig, eval_size, eval_idx, eps)