class_docstr: Base model for object detection with matching.
class_docstr_tok: ["Base","model","for","object","detection","with","matching","."]
docstr: Initialize Detection model.
  
  Args:
    config: Configurations of the model.
    dataset_meta_data: Dataset meta data specifies `target_is_onehot`, which
      is False by default, and a required `num_classes`, which is the number
      of object classes including background/unlabeled/padding. The padded
      objects have label 0. The first legitimate object has label 1, and so
      on.
docstr_tok: ["Initialize","Detection","model",".","Args",":","config",":","Configurations","of","the","model",".","dataset_meta_data",":","Dataset","meta","data","specifies","`","target_is_onehot","`",",","which","is","False","by","default",",","and","a","required","`","num_classes","`",",","which","is","the","number","of","object","classes","including","background\/unlabeled\/padding",".","The","padded","objects","have","label","0",".","The","first","legitimate","object","has","label","1",",","and","so","on","."]
code: def __init__(
      self,
      config: ml_collections.ConfigDict,
      dataset_meta_data: Dict[str, Dict[str, Any]],
  ):
      """Initialize Detection model.
  
      Args:
        config: Configurations of the model.
        dataset_meta_data: Dataset meta data specifies `target_is_onehot`, which
          is False by default, and a required `num_classes`, which is the number
          of object classes including background/unlabeled/padding. The padded
          objects have label 0. The first legitimate object has label 1, and so
          on.
      """
      del dataset_meta_data
      if config is not None:
          self.loss_terms_weights = {
              "loss_ce": config.class_loss_coef,
          }
  
      if config is None:
          logging.warning(
              "You are creating the model with default config."
          )
          config = self.default_flax_model_config()
      self.config = config
      self.target_is_onehot = False
      self.flax_model = self.build_flax_model()
  
file_path: scenic/scenic/projects/layout_denoise/base_model.py
imports: from typing import Any, Dict, Optional, Tuple
  from absl import logging
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import model_utils
label_desc: Use image node_id 1 to create a new LayoutDenoiseBaseModel object from inherited base classes: base_model with example: obj = LayoutDenoiseBaseModel(config, dataset_meta_data)