class_docstr: Vision Transformer model for masked autoencoder pretraining.
class_docstr_tok: ["Vision","Transformer","model","for","masked","autoencoder","pretraining","."]
code: def build_flax_model(self) -> nn.Module:
      model_dtype = getattr(
          jnp, self.config.get("model_dtype_str", "float32")
      )
      num_classes = base_model.get_output_shapes(
          self.config.masked_feature_loss.target,
          tuple(self.config.model.patches.size),
      )
  
      return ViTMaskedAutoencoder(
          num_classes=num_classes,
          mlp_dim=self.config.model.mlp_dim,
          num_layers=self.config.model.num_layers,
          num_heads=self.config.model.num_heads,
          representation_size=self.config.model.representation_size,
          patches=self.config.model.patches,
          hidden_size=self.config.model.hidden_size,
          positional_embedding=self.config.model.get(
              "positional_embedding", "sinusoidal_2d"
          ),
          positional_embedding_decoder=self.config.model.get(
              "positional_embedding_decoder", "sinusoidal_2d"
          ),
          decoder_config=self.config.model.decoder_config,
          token_mask_probability=(
              self.config.masked_feature_loss.token_mask_probability
          ),
          classifier=self.config.model.classifier,
          dropout_rate=self.config.model.get("dropout_rate", 0.1),
          attention_dropout_rate=self.config.model.get(
              "attention_dropout_rate", 0.1
          ),
          stochastic_depth=self.config.model.get(
              "stochastic_depth", 0.0
          ),
          dtype=model_dtype,
      )
  
imports: from typing import Any, Callable, Optional, Sequence
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib.base_models import classification_model
  from scenic.model_lib.base_models import multilabel_classification_model
  from scenic.model_lib.layers import attention_layers
  from scenic.model_lib.layers import nn_layers
  from scenic.projects.av_mae import base_model
  from scenic.projects.av_mae import model_utils
  from scenic.projects.baselines import vit
label_desc: Use image node_id 1 for calling the ViTMaskedAutoencoderModel obj's underlying member method code with example usage: obj.build_flax_model() and returns: ViTMaskedAutoencoder