lgatr.layers.mlp.config.MLPConfig

class lgatr.layers.mlp.config.MLPConfig(mv_channels=None, s_channels=0, dropout_prob=None, nonlinearity='gelu', mlp_ratio=4, num_layers_mlp=2)[source]

Bases: object

Geometric-MLP configuration.

Parameters:
  • mv_channels (int | None) – Number of input multivector channels. Set automatically by the parent network.

  • s_channels (int) – Number of input scalar channels. Use 0 for no scalar stream. Set automatically by the parent network.

  • dropout_prob (float | None) – Dropout probability. Set automatically by the parent network.

  • nonlinearity (str) – Which (gated) activation function to use. One of "relu", "sigmoid", "tanh", "gelu", "silu".

  • mlp_ratio (int) – Factor by which to increase the number of hidden channels (both multivectors and scalars).

  • num_layers_mlp (int) – Total number of layers, including input and output layers (must be >= 1).

classmethod cast(config)[source]

Cast an MLPConfig or mapping to an MLPConfig.

Return type:

MLPConfig

dropout_prob: float | None = None
mlp_ratio: int = 4
mv_channels: int | None = None
nonlinearity: str = 'gelu'
num_layers_mlp: int = 2
s_channels: int = 0