class_docstr: This class defines the `Vision Transformer architecture <https://arxiv.org/abs/2010.11929>`_. Our model implementation
  is inspired from `Early Convolutions Help Transformers See Better <https://arxiv.org/abs/2106.14881>`_
  
  .. note::
      Our implementation is different from the original implementation in two ways:
      1. Kernel size is odd.
      2. Our positional encoding implementation allows us to use ViT with any multiple input scales
      3. We do not use StochasticDepth
      4. We do not add positional encoding to class token (if enabled), as suggested in `DeiT-3 paper <https://arxiv.org/abs/2204.07118>`_
class_docstr_tok: ["This","class","defines","the","`","Vision","Transformer","architecture","<","https",":","\/\/arxiv.org\/abs\/2010.11929",">","`","_",".","Our","model","implementation","is","inspired","from","`","Early","Convolutions","Help","Transformers","See","Better","<","https",":","\/\/arxiv.org\/abs\/2106.14881",">","`","_","..","note",":",":","Our","implementation","is","different","from","the","original","implementation","in","two","ways",":","1",".","Kernel","size","is","odd",".","2",".","Our","positional","encoding","implementation","allows","us","to","use","ViT","with","any","multiple","input","scales","3",".","We","do","not","use","StochasticDepth","4",".","We","do","not","add","positional","encoding","to","class","token","(","if","enabled",")",",","as","suggested","in","`","DeiT-3","paper","<","https",":","\/\/arxiv.org\/abs\/2204.07118",">","`","_"]
code: def forward(
      self, x: Tensor, *args, **kwargs
  ) -> Union[Tensor, Dict[str, Tensor]]:
      # In ViT model, we can return either classifier embeddings (logits) or image embeddings or both.
      # To return the image embeddings, we need to set keyword argument (return_image_embeddings) as True.
  
      if (
          kwargs.get("return_image_embeddings", False)
          or self.neural_augmentor is not None
      ):
          out_dict = {"augmented_tensor": None}
          if self.training and self.neural_augmentor is not None:
              # neural augmentor is applied during training  only
              x = self.neural_augmentor(x)
              out_dict.update({"augmented_tensor": x})
          prediction, image_embedding = self.forward_classifier(
              x, *args, **kwargs
          )
          out_dict.update({"logits": prediction})
          if image_embedding is not None:
              out_dict.update({"image_embeddings": image_embedding})
          return out_dict
      else:
          prediction, _ = self.forward_classifier(x, *args, **kwargs)
          return prediction
  
imports: import argparse
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor, nn
  from torch.utils.checkpoint import checkpoint_sequential
  from cvnets.layers import ConvLayer2d, Dropout, Identity, LinearLayer, MaxPool2d, PositionalEmbedding, TransposeConvLayer2d, get_normalization_layer
  from cvnets.misc.common import parameter_list
  from cvnets.misc.init_utils import initialize_conv_layer
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.classification.config.vit import get_configuration
  from cvnets.modules import TransformerEncoder
  from utils import logger
label_desc: Use image node_id 11 for calling the VisionTransformer obj's underlying member method code with example usage: obj.forward(x) and returns: out_dict, prediction