sakura.models.modules.FCDecoder
- class sakura.models.modules.FCDecoder(input_dim, output_dim, hidden_neurons=50, hidden_layers=3, output_activation_function='relu', dropout=False, dropout_input=False, dropout_input_p=0.5, dropout_hidden=False, dropout_hidden_p=0.5, config=None)
Bases:
ModuleFully connected decoder module class
Module supports configurable hidden layers and neurons, output activation functions, and dropout regularization.
- Architecture details:
When config is None, default 3 hidden layers with structure: Input → Linear → CELU → Linear → CELU → Linear → Output
Hidden layer neurons can be uniform (single neuron count) or varied (list)
Optional dropout placement after the input layer
Optional but uniform dropout placement after hidden layers (if #hidden_layer > 1)
Final layer always has output_dim neurons with optional activation
- Parameters:
input_dim (int) – The dimensionality of the input data
output_dim (int) – The dimensionality of the output data
hidden_neurons (int or list[int], optional) – The number of neurons in each hidden layer, defaults to 50
hidden_layers (int, optional) – The number of layer(s) in the network, defaults to 3
output_activation_function (Literal['relu', 'softmax','identity'], optional) – The activation function for the output layer, defaults to ‘relu’
dropout (bool, optional) – Whether to apply dropout regularization, defaults to False
dropout_input (bool, optional) – Whether to apply dropout to the input layer, defaults to False
dropout_input_p (float, optional) – The probability of dropout for the input layer, defaults to 0.5
dropout_hidden (bool, optional) – Whether to apply dropout to the hidden layer, defaults to False
dropout_hidden_p (float, optional) – The probability of dropout for the hidden layer, defaults to 0.5
config (list[dict],optional, optional) – A list of the module layer configuration dictionaries
Methods
Sequentially forward through all modules in model_list to transform input tensor.
Attributes