Linear Layers
Contents
Linear Layers#
MLP#
- class supar.modules.mlp.MLP(n_in: int, n_out: int, dropout: float = 0.0, activation: bool = True)[source]#
Applies a linear transformation together with a non-linear activation to the incoming tensor: \(y = \mathrm{Activation}(x A^T + b)\)
- Parameters
- forward(x: torch.Tensor) torch.Tensor [source]#
- Parameters
x (Tensor) – The size of each input feature is n_in.
- Returns
A tensor with the size of each output feature n_out.