torch_frame.nn.conv.ExcelFormerConv

class ExcelFormerConv(channels: int, num_cols: int, num_heads: int, diam_dropout: float = 0.0, aium_dropout: float = 0.0, residual_dropout: float = 0.0)[source]

Bases: TableConv

The ExcelFormer Layer introduced in the “ExcelFormer: A Neural Network Surpassing GBDTs on Tabular Data” paper.

Parameters:
  • channels (int) – Input/output channel dimensionality.

  • num_cols (int) – Number of columns.

  • num_heads (int) – Number of attention heads.

  • diam_dropout (float) – diam_dropout. (default: 0)

  • aium_dropout (float) – aium_dropout. (default: 0)

  • residual_dropout (float) – residual dropout. (default: 0)

reset_parameters() None[source]

Resets all learnable parameters of the module.

forward(x: Tensor) Tensor[source]

Process column-wise 3-dimensional tensor into another column-wise 3-dimensional tensor.

Parameters:
  • x (torch.Tensor) – Input column-wise tensor of shape [batch_size, num_cols, hidden_channels].

  • args (Any) – Extra arguments.

  • kwargs (Any) – Extra keyword arguments.