class_docstr: Transformer model for tabular data, can also be used for semi-supervised learning.
  This is the internal transformer model embedding that will have further fully connected layers (TabNet) to
  actually produce predictions.
code: def run_tfmr(self, feat_embs):
      orig_feat_embs = feat_embs
      all_feat_embs = [feat_embs]
      for layer in self.tfmr_layers:
          feat_embs = layer(feat_embs)
          all_feat_embs.append(feat_embs)
          if self.orig_emb_resid:
              feat_embs = feat_embs + orig_feat_embs
  
      if self.readout == "readout_emb":
          out = self.fc_out(feat_embs[0])
      elif self.readout == "mean":
          out = torch.mean(feat_embs, dim=0)
          out = self.fc_out(out)
      elif self.readout == "concat_pool":
          all_feat_embs = torch.cat(all_feat_embs, dim=0)
  
          max = all_feat_embs.max(dim=0).values
          mean = all_feat_embs.mean(dim=0)
          last_layer = feat_embs.transpose(0, 1).reshape(
              feat_embs.shape[1], -1
          )
          out = torch.cat((last_layer, max, mean), dim=1)
          out = self.fc_out(out)
      elif self.readout == "concat_pool_all":
          feat_embs_all_layers = []
          for each_feat_embs in [all_feat_embs[0], all_feat_embs[-1]]:
              feat_embs_all_layers.append(
                  each_feat_embs.transpose(0, 1).reshape(
                      each_feat_embs.shape[1], -1
                  )
              )
  
          all_feat_embs = torch.cat(all_feat_embs, dim=0)
          max = all_feat_embs.max(dim=0).values
          mean = all_feat_embs.mean(dim=0)
  
          feat_embs_all_layers.append(max)
          feat_embs_all_layers.append(mean)
          out = torch.cat(feat_embs_all_layers, dim=1)
          out = self.fc_out(out)
      elif self.readout == "concat_pool_add":
          orig_feat_embs_cp = copy.deepcopy(orig_feat_embs.detach())
          # ce_dim = orig_feat_embs_cp.shape[-1]//8
          # orig_feat_embs_cp[:, :, ce_dim:] = 0
  
          last_layer = feat_embs.transpose(0, 1).reshape(
              feat_embs.shape[1], -1
          )
          last_layer += orig_feat_embs_cp.transpose(0, 1).reshape(
              orig_feat_embs_cp.shape[1], -1
          )
  
          all_feat_embs = torch.cat(all_feat_embs, dim=0)
          max = all_feat_embs.max(dim=0).values
          mean = all_feat_embs.mean(dim=0)
  
          out = torch.cat([last_layer, max, mean], dim=1)
  
      elif self.readout == "all_feat_embs":
          out = feat_embs
  
      elif self.readout == "mean_feat_embs":
          out = feat_embs.mean(dim=0)
  
      elif self.readout == "none":
          out = feat_embs.transpose(1, 0)
  
      return out
  
file_path: autogluon/tabular/src/autogluon/tabular/models/tab_transformer/tab_transformer.py
imports: import copy
  import torch
  import torch.nn
  from .tab_model_base import TabModelBase
label_desc: Use image node_id 3 for calling the TabTransformer obj's underlying member method code with example usage: obj.run_tfmr(feat_embs) and returns: out