docstr: Args:
      img_size (int, tuple): input image size
      patch_size (int, tuple): patch size
      in_c (int): number of input channels
      num_classes (int): number of classes for classification head
      embed_dim (int): embedding dimension
      depth (int): depth of transformer
      num_heads (int): number of attention heads
      mlp_ratio (int): ratio of mlp hidden dim to embedding dim
      qkv_bias (bool): enable bias for qkv if True
      qk_scale (float): override default qk scale of head_dim ** -0.5 if set
      representation_size (Optional[int]): enable and set representation layer (pre-logits) to this value if set
      distilled (bool): model includes a distillation token and head as in DeiT models
      drop_ratio (float): dropout rate
      attn_drop_ratio (float): attention dropout rate
      drop_path_ratio (float): stochastic depth rate
      embed_layer (nn.Module): patch embedding layer
      norm_layer: (nn.Module): normalization layer
code: def __init__(
      self,
      img_size=224,
      patch_size=16,
      in_c=3,
      num_classes=1000,
      embed_dim=768,
      depth=12,
      num_heads=12,
      mlp_ratio=4.0,
      qkv_bias=True,
      qk_scale=None,
      representation_size=None,
      distilled=False,
      drop_ratio=0.0,
      attn_drop_ratio=0.0,
      drop_path_ratio=0.0,
      embed_layer=PatchEmbed,
      norm_layer=None,
      act_layer=None,
  ):
      """
      Args:
          img_size (int, tuple): input image size
          patch_size (int, tuple): patch size
          in_c (int): number of input channels
          num_classes (int): number of classes for classification head
          embed_dim (int): embedding dimension
          depth (int): depth of transformer
          num_heads (int): number of attention heads
          mlp_ratio (int): ratio of mlp hidden dim to embedding dim
          qkv_bias (bool): enable bias for qkv if True
          qk_scale (float): override default qk scale of head_dim ** -0.5 if set
          representation_size (Optional[int]): enable and set representation layer (pre-logits) to this value if set
          distilled (bool): model includes a distillation token and head as in DeiT models
          drop_ratio (float): dropout rate
          attn_drop_ratio (float): attention dropout rate
          drop_path_ratio (float): stochastic depth rate
          embed_layer (nn.Module): patch embedding layer
          norm_layer: (nn.Module): normalization layer
      """
      super(VisionTransformer, self).__init__()
      self.num_classes = num_classes
      self.num_features = (
          self.embed_dim
      ) = embed_dim  # num_features for consistency with other models
      self.num_tokens = 2 if distilled else 1
      norm_layer = norm_layer or partial(nn.LayerNorm, eps=1e-6)
      act_layer = act_layer or nn.GELU
  
      self.patch_embed = embed_layer(
          img_size=img_size,
          patch_size=patch_size,
          in_c=in_c,
          embed_dim=embed_dim,
      )
      num_patches = self.patch_embed.num_patches
  
      self.cls_token = nn.Parameter(torch.zeros(1, 1, embed_dim))
      self.dist_token = (
          nn.Parameter(torch.zeros(1, 1, embed_dim))
          if distilled
          else None
      )
      self.pos_embed = nn.Parameter(
          torch.zeros(1, num_patches + self.num_tokens, embed_dim)
      )
      self.pos_drop = nn.Dropout(p=drop_ratio)
  
      dpr = [
          x.item() for x in torch.linspace(0, drop_path_ratio, depth)
      ]  # stochastic depth decay rule
      self.blocks = nn.Sequential(
          *[
              Block(
                  dim=embed_dim,
                  num_heads=num_heads,
                  mlp_ratio=mlp_ratio,
                  qkv_bias=qkv_bias,
                  qk_scale=qk_scale,
                  drop_ratio=drop_ratio,
                  attn_drop_ratio=attn_drop_ratio,
                  drop_path_ratio=dpr[i],
                  norm_layer=norm_layer,
                  act_layer=act_layer,
              )
              for i in range(depth)
          ]
      )
      self.norm = norm_layer(embed_dim)
  
      # Representation layer
      if representation_size and not distilled:
          self.has_logits = True
          self.num_features = representation_size
          self.pre_logits = nn.Sequential(
              OrderedDict(
                  [
                      ("fc", nn.Linear(embed_dim, representation_size)),
                      ("act", nn.Tanh()),
                  ]
              )
          )
      else:
          self.has_logits = False
          self.pre_logits = nn.Identity()
  
      # Classifier head(s)
      self.head = (
          nn.Linear(self.num_features, num_classes)
          if num_classes > 0
          else nn.Identity()
      )
      self.head_dist = None
      if distilled:
          self.head_dist = (
              nn.Linear(self.embed_dim, self.num_classes)
              if num_classes > 0
              else nn.Identity()
          )
  
      # Weight init
      nn.init.trunc_normal_(self.pos_embed, std=0.02)
      if self.dist_token is not None:
          nn.init.trunc_normal_(self.dist_token, std=0.02)
  
      nn.init.trunc_normal_(self.cls_token, std=0.02)
      self.apply(_init_vit_weights)
  
imports: from functools import partial
  from collections import OrderedDict
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new VisionTransformer object from inherited base classes: nn with example: obj = VisionTransformer(img_size, patch_size, in_c, num_classes, embed_dim, depth, num_heads, mlp_ratio, qkv_bias, qk_scale, representation_size, distilled, drop_ratio, attn_drop_ratio, drop_path_ratio, embed_layer, norm_layer, act_layer)