class_docstr: Encoder of DAB-DETR.
docstr: Initialize encoder layers.
docstr_tok: ["Initialize","encoder","layers","."]
code: def _init_layers(self):
      """Initialize encoder layers."""
      self.layers = ModuleList(
          [
              DetrTransformerEncoderLayer(**self.layer_cfg)
              for _ in range(self.num_layers)
          ]
      )
      embed_dims = self.layers[0].embed_dims
      self.embed_dims = embed_dims
      self.query_scale = MLP(embed_dims, embed_dims, embed_dims, 2)
  
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 for calling the DABDetrTransformerEncoder obj's underlying member method code with example usage: obj._init_layers() without return types