code: def __init__(
      self,
      n_cont_features,
      norm_class_name,
      cat_feat_origin_cards,
      max_emb_dim,
      p_dropout,
      one_hot_embeddings,
      drop_whole_embeddings,
  ):
      super().__init__()
      """
          Base class for all TabTransformer models
          
          Parameters
          ----------
          max_emb_dim (int): Maximum allowable amount of embeddings.
          n_cont_features (int): How many continuous features to concatenate onto the categorical features.
          cat_feat_origin_cards (list): Categorical features to turn into embeddings.
          norm_class: What normalization to use for continuous features.
          p_dropout (float): How much dropout to apply.
          drop_whole_embeddings (bool): If True, dropout pretends the embedding was a missing value. If false, dropout sets embed features to 0
          one_hot_embeddings (bool): If True, one-hot encode variables whose cardinality is < max_emb_dim.
          cat_initializers (dict): Structure to hold the initial embeddings for categorical features.
          """
      self.max_emb_dim = max_emb_dim
      self.n_cont_features = n_cont_features
      self.cat_feat_origin_cards = cat_feat_origin_cards
      self.norm_class = nn.__dict__[norm_class_name]
  
      self.p_dropout = p_dropout
      self.drop_whole_embeddings = drop_whole_embeddings
      self.one_hot_embeddings = one_hot_embeddings
  
      self.cat_initializers = nn.ModuleDict()
  
      from .tab_transformer_encoder import EmbeddingInitializer
  
      if isinstance(self.cat_feat_origin_cards, list):
          for col_name, card in self.cat_feat_origin_cards:
              self.cat_initializers[col_name] = EmbeddingInitializer(
                  card,
                  max_emb_dim,
                  p_dropout,
                  drop_whole_embeddings=drop_whole_embeddings,
                  one_hot=one_hot_embeddings,
              )
          self.init_feat_dim = (
              sum(i.emb_dim for i in self.cat_initializers.values())
              + self.n_cont_features
          )
  
file_path: autogluon/tabular/src/autogluon/tabular/models/tab_transformer/tab_model_base.py
imports: import torch.nn
label_desc: Use image node_id 1 to create a new TabModelBase object from inherited base classes: nn with example: obj = TabModelBase(n_cont_features, norm_class_name, cat_feat_origin_cards, max_emb_dim, p_dropout, one_hot_embeddings, drop_whole_embeddings)