class_docstr: Class for TabNet model.
class_docstr_tok: ["Class","for","TabNet","model","."]
docstr: Setup the network and explain matrix.
docstr_tok: ["Setup","the","network","and","explain","matrix","."]
code: def _set_network(self):
      """Setup the network and explain matrix."""
      torch.manual_seed(self.seed)
  
      self.group_matrix = create_group_matrix(
          self.grouped_features, self.input_dim
      )
  
      self.network = tab_network.TabNet(
          self.input_dim,
          self.output_dim,
          n_d=self.n_d,
          n_a=self.n_a,
          n_steps=self.n_steps,
          gamma=self.gamma,
          cat_idxs=self.cat_idxs,
          cat_dims=self.cat_dims,
          cat_emb_dim=self.cat_emb_dim,
          n_independent=self.n_independent,
          n_shared=self.n_shared,
          epsilon=self.epsilon,
          virtual_batch_size=self.virtual_batch_size,
          momentum=self.momentum,
          mask_type=self.mask_type,
          group_attention_matrix=self.group_matrix.to(self.device),
      ).to(self.device)
  
      self.reducing_matrix = create_explain_matrix(
          self.network.input_dim,
          self.network.cat_emb_dim,
          self.network.cat_idxs,
          self.network.post_embed_dim,
      )
  
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 14 for calling the TabModel obj's underlying member method code with example usage: obj._set_network() without return types