class_docstr: Class for TabNet model.
class_docstr_tok: ["Class","for","TabNet","model","."]
docstr: Updates parameters.
  If does not already exists, creates it.
  Otherwise overwrite with warnings.
docstr_tok: ["Updates","parameters",".","If","does","not","already","exists",",","creates","it",".","Otherwise","overwrite","with","warnings","."]
code: def __update__(self, **kwargs):
      """
      Updates parameters.
      If does not already exists, creates it.
      Otherwise overwrite with warnings.
      """
      update_list = [
          "cat_dims",
          "cat_emb_dim",
          "cat_idxs",
          "input_dim",
          "mask_type",
          "n_a",
          "n_d",
          "n_independent",
          "n_shared",
          "n_steps",
          "grouped_features",
      ]
      for var_name, value in kwargs.items():
          if var_name in update_list:
              try:
                  exec(
                      f"global previous_val; previous_val = self.{var_name}"
                  )
                  if previous_val != value:  # noqa
                      wrn_msg = f"Pretraining: {var_name} changed from {previous_val} to {value}"  # noqa
                      warnings.warn(wrn_msg)
                      exec(f"self.{var_name} = value")
              except AttributeError:
                  exec(f"self.{var_name} = value")
  
imports: from dataclasses import dataclass, field
  from typing import List, Any, Dict
  import torch
  from torch.nn.utils import clip_grad_norm_
  import numpy
  from scipy.sparse import csc_matrix
  from abc import abstractmethod
  from pytorch_tabnet import tab_network
  from pytorch_tabnet.utils import SparsePredictDataset, PredictDataset, create_explain_matrix, validate_eval_set, create_dataloaders, define_device, ComplexEncoder, check_input, check_warm_start, create_group_matrix, check_embedding_parameters
  from pytorch_tabnet.callbacks import CallbackContainer, History, EarlyStopping, LRSchedulerCallback
  from pytorch_tabnet.metrics import MetricContainer, check_metrics
  from sklearn.base import BaseEstimator
  from torch.utils.data import DataLoader
  import io
  import json
  from pathlib import Path
  import shutil
  import zipfile
  import warnings
  import copy
  import scipy
label_desc: Use image node_id 2 for calling the TabModel obj's underlying member method code with example usage: obj.__update__() without return types