class_docstr: X-ViT model for multi-label classification task.
class_docstr_tok: ["X-ViT","model","for","multi-label","classification","task","."]
code: def build_flax_model(self):
      return XViT(
          num_outputs=self.dataset_meta_data["num_classes"],
          mlp_dim=self.config.model.mlp_dim,
          num_layers=self.config.model.num_layers,
          attention_configs=self.config.model.attention_configs,
          attention_fn=self.config.model.attention_fn,
          patches=self.config.model.patches,
          hidden_size=self.config.model.hidden_size,
          transformer_encoder_configs=self.config.model.transformer_encoder_configs,
          representation_size=self.config.model.representation_size,
          classifier=self.config.model.classifier,
          dropout_rate=self.config.model.get("dropout_rate", 0.0),
          attention_dropout_rate=self.config.model.get(
              "attention_dropout_rate", 0.0
          ),
      )
  
imports: from typing import Any, Optional
  import flax.linen
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models.multilabel_classification_model import MultiLabelClassificationModel
  from scenic.model_lib.layers import attention_layers
  from scenic.model_lib.layers import nn_layers
  from scenic.model_lib.layers import nn_ops
  from scenic.projects.baselines import vit
  from scenic.projects.fast_vit import model_utils
label_desc: Use image node_id 1 for calling the XViTMultiLabelClassificationModel obj's underlying member method code with example usage: obj.build_flax_model() and returns: XViT