code: def vit_b(
      pretrained: bool = False, **kwargs: Any
  ) -> VisionTransformer:
      """VisionTransformer-B architecture as described in
      `"An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale",
      <https://arxiv.org/pdf/2010.11929.pdf>`_. Patches: (H, W) -> (H/8, W/8)
  
      >>> import torch
      >>> from doctr.models import vit_b
      >>> model = vit_b(pretrained=False)
      >>> input_tensor = torch.rand((1, 3, 32, 32), dtype=tf.float32)
      >>> out = model(input_tensor)
  
      Args:
      ----
          pretrained: boolean, True if model is pretrained
          **kwargs: keyword arguments of the VisionTransformer architecture
  
      Returns:
      -------
          A feature extractor model
      """
      return _vit(
          "vit_b",
          pretrained,
          d_model=768,
          num_layers=12,
          num_heads=12,
          ffd_ratio=4,
          ignore_keys=["2.head.weight", "2.head.bias"],
          **kwargs,
      )
  
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 3 for calling a global function with example usage: vit_b(pretrained) and returns: _vit