code: def _vit(c: Configs):
      """
      ### Create model
      """
      from labml_nn.transformers.vit import (
          VisionTransformer,
          LearnedPositionalEmbeddings,
          ClassificationHead,
          PatchEmbeddings,
      )
  
      # Transformer size from [Transformer configurations](../configs.html#TransformerConfigs)
      d_model = c.transformer.d_model
      # Create a vision transformer
      return VisionTransformer(
          c.transformer.encoder_layer,
          c.transformer.n_layers,
          PatchEmbeddings(d_model, c.patch_size, 3),
          LearnedPositionalEmbeddings(d_model),
          ClassificationHead(
              d_model, c.n_hidden_classification, c.n_classes
          ),
      ).to(c.device)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/transformers/vit/experiment.py
imports: from labml import experiment
  from labml.configs import option
  from labml_nn.experiments.cifar10 import CIFAR10Configs
  from labml_nn.transformers import TransformerConfigs
label_desc: Use image node_id 2 for calling a global function with example usage: _vit(c) and returns: VisionTransformer