noether.core.schemas.modules.mlp¶
Classes¶
Module Contents¶
- class noether.core.schemas.modules.mlp.MLPConfig(/, **data)¶
Bases:
pydantic.BaseModel- Parameters:
data (Any)
Hidden dimension for each layer.
- num_layers: int = 0¶
Number of hidden layers in the MLP. If 0, the MLP is a two linear layer MLP from input_dim, hidden_dim, activation to output_dim.
- init_weights: noether.core.types.InitWeightsMode = 'truncnormal002'¶
Weight initialization method.
- class noether.core.schemas.modules.mlp.UpActDownMLPConfig(/, **data)¶
Bases:
pydantic.BaseModel- Parameters:
data (Any)
Hidden dimension of the MLP.
- init_weights: noether.core.types.InitWeightsMode = None¶
Initialization method of the weights of the MLP. Options are “torch” (i.e., similar to the module) or ‘truncnormal002’. Defaults to ‘truncnormal002’.
- check_dims()¶
Validator to check that hidden_dim is greater than input_dim.
- Raises:
ValueError – raised if hidden_dim is not greater than input_dim.
- Return type: