code: def __init__(self, config: DictConfig, **kwargs):
      assert (
          "inferred_config" in kwargs
      ), "inferred_config not found in initialization arguments"
      self.inferred_config = kwargs["inferred_config"]
      assert (
          config.task == "regression"
      ), "MDN is only implemented for Regression"
      super().__init__(config, **kwargs)
      assert (
          self.hparams.output_dim == 1
      ), "MDN is not implemented for multi-targets"
      if config.target_range is not None:
          logger.warning("MDN does not use target range. Ignoring it.")
      self._val_output = []
  
imports: from typing import Dict, Optional, Union
  import torch
  import torch.nn
  from omegaconf import DictConfig, OmegaConf
  from torch import Tensor
  from pytorch_tabular import models
  from pytorch_tabular.config.config import ModelConfig
  from pytorch_tabular.models.common.heads import blocks
  from pytorch_tabular.models.tab_transformer.tab_transformer import TabTransformerBackbone
  from pytorch_tabular.tabular_model import getattr_nested
  from pytorch_tabular.utils import get_logger
  from ..base_model import BaseModel, safe_merge_config
label_desc: Use image node_id 1 to create a new MDNModel object from inherited base classes: BaseModel with example: obj = MDNModel(config)