calpit.nn.models
Classes
Multi-Layer Perceptron (MLP) neural network model. |
Module Contents
- class MLP(input_dim, hidden_layers, output_dim=1, sigmoid=True)[source]
Bases:
torch.nn.ModuleMulti-Layer Perceptron (MLP) neural network model.
- Parameters:
input_dim (int) – The number of input features.
hidden_layers (list) – A list of integers representing the number of units in each hidden layer.
output_dim (int) – The number of output units. Defaults to 1.
sigmoid (bool) – Whether to apply a sigmoid activation function to the output layer. Defaults to True.