class_docstr: Backbone for the Masked Autoencoder model [0].
  
  Converts images into patches and encodes them. Code inspired by [1].
  Note that this implementation uses a learned positional embedding while [0]
  uses a fixed positional embedding.
  
  - [0]: Masked Autoencoder, 2021, https://arxiv.org/abs/2111.06377
  - [1]: https://github.com/facebookresearch/mae
  - [2]: Early Convolutions Help Transformers See Better, 2021, https://arxiv.org/abs/2106.14881.
  
  Attributes:
      image_size:
          Input image size.
      patch_size:
          Width and height of the image patches. image_size must be a multiple
          of patch_size.
      num_layers:
          Number of transformer blocks.
      num_heads:
          Number of attention heads.
      hidden_dim:
          Dimension of the input and output tokens.
      mlp_dim:
          Dimension of the MLP in the transformer block.
      dropout:
          Percentage of elements set to zero after the MLP in the transformer.
      attention_dropout:
          Percentage of elements set to zero after the attention head.
      num_classes:
          Number of classes for the classification head. Currently not used.
      representation_size:
          If specified, an additional linear layer is added before the
          classification head to change the token dimension from hidden_dim
          to representation_size. Currently not used.
      norm_layer:
          Callable that creates a normalization layer.
      conv_stem_configs:
          If specified, a convolutional stem is added at the beggining of the
          network following [2]. Not used in the original Masked Autoencoder
          paper [0].
code: def __init__(
      self,
      image_size: int,
      patch_size: int,
      num_layers: int,
      num_heads: int,
      hidden_dim: int,
      mlp_dim: int,
      dropout: float = 0,
      attention_dropout: float = 0,
      num_classes: int = 1000,
      representation_size: Optional[int] = None,
      norm_layer: Callable[..., torch.nn.Module] = partial(
          nn.LayerNorm, eps=1e-6
      ),
      conv_stem_configs: Optional[List[ConvStemConfig]] = None,
  ):
      super().__init__(
          image_size=image_size,
          patch_size=patch_size,
          num_layers=num_layers,
          num_heads=num_heads,
          hidden_dim=hidden_dim,
          mlp_dim=mlp_dim,
          dropout=dropout,
          attention_dropout=attention_dropout,
          num_classes=num_classes,
          representation_size=representation_size,
          norm_layer=norm_layer,
          conv_stem_configs=conv_stem_configs,
      )
      self.encoder = MAEEncoder(
          seq_length=self.seq_length,
          num_layers=num_layers,
          num_heads=num_heads,
          hidden_dim=hidden_dim,
          mlp_dim=mlp_dim,
          dropout=dropout,
          attention_dropout=attention_dropout,
          norm_layer=norm_layer,
      )
  
imports: from __future__ import annotations
  import math
  from functools import partial
  from typing import Callable, List, Optional
  import torch
  import torch.nn
  from torchvision.models import vision_transformer
  from torchvision.models.vision_transformer import ConvStemConfig
  from lightly.models import utils
label_desc: Use image node_id 1 to create a new MAEBackbone object from inherited base classes: vision_transformer with example: obj = MAEBackbone(image_size, patch_size, num_layers, num_heads, hidden_dim, mlp_dim, dropout, attention_dropout, num_classes, representation_size, norm_layer, conv_stem_configs)