class_docstr: Layout model.
class_docstr_tok: ["Layout","model","."]
code: def build_flax_model(self):
      return LayoutDenoiseModel(
          modal_ranges=self.config["modal_ranges"],
          num_classes=self.config["num_classes"],
          vocab_size=self.config["vocab_size"],
          hidden_dim=self.config.get("hidden_dim", 512),
          query_emb_size=self.config.get("query_emb_size", None),
          transformer_num_heads=self.config.get(
              "transformer_num_heads", 8
          ),
          transformer_num_encoder_layers=self.config.get(
              "transformer_num_encoder_layers", 6
          ),
          transformer_num_decoder_layers=self.config.get(
              "transformer_num_decoder_layers", 6
          ),
          transformer_qkv_dim=self.config.get(
              "transformer_qkv_dim", 512
          ),
          transformer_mlp_dim=self.config.get(
              "transformer_mlp_dim", 2048
          ),
          transformer_normalize_before=self.config.get(
              "transformer_normalize_before", False
          ),
          backbone_num_filters=self.config.get(
              "backbone_num_filters", 64
          ),
          backbone_num_layers=self.config.get(
              "backbone_num_layers", 50
          ),
          aux_loss=self.config.get("aux_loss", False),
          dropout_rate=self.config.get("dropout_rate", 0.0),
          attention_dropout_rate=self.config.get(
              "attention_dropout_rate", 0.0
          ),
          dtype=jnp.float32,
          class_dropout_rate=self.config.get("class_dropout_rate", 0.0),
          model_type=self.config.get("model_type", "full"),
          pos_pattern=self.config.get("pos_pattern", "1/4"),
      )
  
imports: from typing import Any, Dict, List, Tuple, Optional
  import flax.linen
  import jax.numpy
  import ml_collections
  from scenic.projects.baselines import resnet
  from scenic.projects.layout_denoise import base_model
  from scenic.projects.layout_denoise.layers import common
  from scenic.projects.layout_denoise.layers import embedding
  from scenic.projects.layout_denoise.layers import predictor
  from scenic.projects.layout_denoise.layers import transformer
label_desc: Use image node_id 1 for calling the LayoutModel obj's underlying member method code with example usage: obj.build_flax_model() and returns: LayoutDenoiseModel