class_docstr: VisionTransformer architecture as described in
  `"An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale",
  <https://arxiv.org/pdf/2010.11929.pdf>`_.
  
  Args:
  ----
      d_model: dimension of the transformer layers
      num_layers: number of transformer layers
      num_heads: number of attention heads
      ffd_ratio: multiplier for the hidden dimension of the feedforward layer
      patch_size: size of the patches
      input_shape: size of the input image
      dropout: dropout rate
      num_classes: number of output classes
      include_top: whether the classifier head should be instantiated
class_docstr_tok: ["VisionTransformer","architecture","as","described","in","`","``","An","Image","is","Worth","16x16","Words",":","Transformers","for","Image","Recognition","at","Scale","''",",","<","https",":","\/\/arxiv.org\/pdf\/2010.11929.pdf",">","`","_",".","Args",":","--","--","d_model",":","dimension","of","the","transformer","layers","num_layers",":","number","of","transformer","layers","num_heads",":","number","of","attention","heads","ffd_ratio",":","multiplier","for","the","hidden","dimension","of","the","feedforward","layer","patch_size",":","size","of","the","patches","input_shape",":","size","of","the","input","image","dropout",":","dropout","rate","num_classes",":","number","of","output","classes","include_top",":","whether","the","classifier","head","should","be","instantiated"]
code: def __init__(
      self,
      d_model: int,
      num_layers: int,
      num_heads: int,
      ffd_ratio: int,
      patch_size: Tuple[int, int] = (4, 4),
      input_shape: Tuple[int, int, int] = (3, 32, 32),
      dropout: float = 0.0,
      num_classes: int = 1000,
      include_top: bool = True,
      cfg: Optional[Dict[str, Any]] = None,
  ) -> None:
      _layers: List[nn.Module] = [
          PatchEmbedding(input_shape, d_model, patch_size),
          EncoderBlock(
              num_layers,
              num_heads,
              d_model,
              d_model * ffd_ratio,
              dropout,
              nn.GELU(),
          ),
      ]
      if include_top:
          _layers.append(ClassifierHead(d_model, num_classes))
  
      super().__init__(*_layers)
      self.cfg = cfg
  
file_path: doctr/doctr/models/classification/vit/pytorch.py
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  from torch import nn
  from doctr.datasets import VOCABS
  from doctr.models.modules.transformer import EncoderBlock
  from doctr.models.modules.vision_transformer.pytorch import PatchEmbedding
  from ...utils.pytorch import load_pretrained_params
label_desc: Use image node_id 1 to create a new VisionTransformer object from inherited base classes: nn with example: obj = VisionTransformer(d_model, num_layers, num_heads, ffd_ratio, patch_size, input_shape, dropout, num_classes, include_top, cfg)