class_docstr: Transformer Encoder without hierarchical structure
      
class_docstr_tok: ["Transformer","Encoder","without","hierarchical","structure"]
code: def __init__(
      self,
      embed_dim=768,
      depth=4,
      num_heads=12,
      mlp_ratio=4.0,
      qkv_bias=False,
      qk_scale=None,
      drop_rate=0.0,
      attn_drop_rate=0.0,
      drop_path_rate=0.0,
  ):
      super().__init__()
  
      self.blocks = nn.ModuleList(
          [
              Block(
                  dim=embed_dim,
                  num_heads=num_heads,
                  mlp_ratio=mlp_ratio,
                  qkv_bias=qkv_bias,
                  qk_scale=qk_scale,
                  drop=drop_rate,
                  attn_drop=attn_drop_rate,
                  drop_path=drop_path_rate[i]
                  if isinstance(drop_path_rate, list)
                  else drop_path_rate,
              )
              for i in range(depth)
          ]
      )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from timm.models.layers import DropPath
  from lavis.models.ulip_models.pointbert.dvae import Group
  from lavis.models.ulip_models.pointbert.dvae import Encoder
  from lavis.models.ulip_models.pointbert.logger import print_log
  from lavis.models.ulip_models.pointbert.checkpoint import get_missing_parameters_message, get_unexpected_parameters_message
label_desc: Use image node_id 1 to create a new TransformerEncoder object from inherited base classes: nn with example: obj = TransformerEncoder(embed_dim, depth, num_heads, mlp_ratio, qkv_bias, qk_scale, drop_rate, attn_drop_rate, drop_path_rate)