noether.modeling.modules.layers.linear_projection

Classes

LinearProjection

LinearProjection is a linear projection layer that can be used for 1D, 2D, and 3D data.

Module Contents

class noether.modeling.modules.layers.linear_projection.LinearProjection(config)

Bases: torch.nn.Module

LinearProjection is a linear projection layer that can be used for 1D, 2D, and 3D data.

Initialize the LinearProjection.

Parameters:

config (noether.core.schemas.modules.layers.LinearProjectionConfig) – The configuration of the LinearProjection.

Raises:

NotImplementedError – raises not implemented error if the number of dimensions of the input domain is bigger than 4.

project: torch.nn.Module
init_weights
reset_parameters()
Reset the parameters of the MLP with a specific initialization. Options are “torch” (i.e., default) or

“truncnormal002”.

Raises:

NotImplementedError – raised if the specified initialization is not implemented.

Return type:

None

forward(x)

Forward function of the LinearProjection.

Parameters:

x (torch.Tensor) – Input tensor to the LinearProjection.

Returns:

Output tensor from the LinearProjection.

Return type:

torch.Tensor