class_docstr: Matryoshka Vision Transformer model for multi-label classification task.
class_docstr_tok: ["Matryoshka","Vision","Transformer","model","for","multi-label","classification","task","."]
code: def build_flax_model(self) -> nn.Module:
      dtype_str = self.config.get("model_dtype_str", "float32")
      if dtype_str != "float32":
          raise ValueError(
              "`dtype` argument is not propagated properly "
              "in the current implmentation, so only "
              "`float32` is supported for now."
          )
      return MatViT(
          num_classes=self.dataset_meta_data["num_classes"],
          mlp_dim=self.config.model.mlp_dim,
          num_layers=self.config.model.num_layers,
          num_heads=self.config.model.num_heads,
          positional_embedding=self.config.model.get(
              "positional_embedding", "learned_1d"
          ),
          representation_size=self.config.model.representation_size,
          patches=self.config.model.patches,
          hidden_size=self.config.model.hidden_size,
          classifier=self.config.model.classifier,
          dropout_rate=self.config.model.get("dropout_rate"),
          attention_dropout_rate=self.config.model.get(
              "attention_dropout_rate"
          ),
          stochastic_depth=self.config.model.get(
              "stochastic_depth", 0.0
          ),
          dtype=getattr(jnp, dtype_str),
      )
  
imports: from typing import Any, Callable, List, Optional, Sequence
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.layers import attention_layers
  from scenic.model_lib.layers import nn_layers
  from scenic.projects.baselines import vit
  from scenic.projects.matvit import layers
label_desc: Use image node_id 1 for calling the MatViTMultiLabelClassificationModel obj's underlying member method code with example usage: obj.build_flax_model() and returns: MatViT