class_docstr: Custom Head for GATE.
  
  Args:
      input_dim (int): Input dimension of the head
      hparams (DictConfig): Config of the model
class_docstr_tok: ["Custom","Head","for","GATE",".","Args",":","input_dim","(","int",")",":","Input","dimension","of","the","head","hparams","(","DictConfig",")",":","Config","of","the","model"]
code: def forward(self, backbone_features: torch.Tensor) -> torch.Tensor:
      # B x L x T
      if not self.hparams.share_head_weights:
          # B x T X Output
          y_hat = torch.cat(
              [
                  h(backbone_features[:, :, i]).unsqueeze(1)
                  for i, h in enumerate(self.head)
              ],
              dim=1,
          )
      else:
          # https://discuss.pytorch.org/t/how-to-pass-a-3d-tensor-to-linear-layer/908/6
          # B x T x L -> B x T x Output
          y_hat = self.head(backbone_features.transpose(2, 1))
  
      # applying weights to each tree and summing up
      # ETA
      y_hat = y_hat * self.eta.reshape(1, -1, 1)
      # summing up
      y_hat = y_hat.sum(dim=1)
  
      if self.hparams.task == "regression":
          y_hat = y_hat + self.T0
      return y_hat
  
imports: import torch
  import torch.nn
  from omegaconf import DictConfig
  from pytorch_tabular.models.common.heads import blocks
  from pytorch_tabular.models.common.layers import Add, Embedding1dLayer, GatedFeatureLearningUnit, NeuralDecisionTree
  from pytorch_tabular.models.common.layers.activations import entmax15, entmoid15, sparsemax, sparsemoid, t_softmax
  from pytorch_tabular.utils import get_logger
  from ..base_model import BaseModel
label_desc: Use image node_id 3 for calling the CustomHead obj's underlying member method code with example usage: obj.forward(backbone_features) and returns: y_hat