class_docstr: Vision Transformer with support for patch input
      
code: def __init__(
      self,
      img_size=224,
      patch_size=16,
      in_channels=3,
      embed_dim=768,
      depth=12,
      num_heads=12,
      mlp_ratio=4,
      qkv_bias=False,
      qk_scale=None,
      drop_rate=0.0,
      attn_drop_rate=0.0,
      drop_path_rate=0.0,
      norm_layer="nn.LayerNorm",
      epsilon=1e-5,
      final_norm=False,
      pretrained=None,
      **args,
  ):
      super().__init__()
      self.img_size = img_size
      self.embed_dim = embed_dim
  
      self.patch_embed = PatchEmbed(
          img_size=img_size,
          patch_size=patch_size,
          in_chans=in_channels,
          embed_dim=embed_dim,
      )
      self.pos_w = self.patch_embed.num_patches_in_w
      self.pos_h = self.patch_embed.num_patches_in_h
  
      self.pos_embed = self.create_parameter(
          shape=(1, self.pos_w * self.pos_h + 1, embed_dim),
          default_initializer=paddle.nn.initializer.TruncatedNormal(
              std=0.02
          ),
      )
      self.cls_token = self.create_parameter(
          shape=(1, 1, embed_dim),
          default_initializer=paddle.nn.initializer.Constant(value=0.0),
      )
      self.pos_drop = nn.Dropout(p=drop_rate)
  
      dpr = np.linspace(0, drop_path_rate, depth)
  
      self.blocks = nn.LayerList(
          [
              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=dpr[i],
                  norm_layer=norm_layer,
                  epsilon=epsilon,
              )
              for i in range(depth)
          ]
      )
  
      self.final_norm = final_norm
      if self.final_norm:
          self.norm = eval(norm_layer)(embed_dim, epsilon=epsilon)
      self.pretrained = pretrained
      self.init_weight()
  
imports: import os
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  from paddleseg.cvlibs import manager
  from paddleseg.utils import utils, logger
  from paddleseg.models.backbones.transformer_utils import to_2tuple, DropPath, Identity
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_channels, embed_dim, depth, num_heads, mlp_ratio, qkv_bias, qk_scale, drop_rate, attn_drop_rate, drop_path_rate, norm_layer, epsilon, final_norm, pretrained)