sakura.models.modules.FCCompressor
- class sakura.models.modules.FCCompressor(input_dim: int, output_dim: int, hidden_neurons: int = 50, hidden_layers: int = 1, config=None)
Bases:
ModuleFully connected compressor module class
This module is designed to compress outputs from pre-encoder to a lower dimension with configurable hidden layers and neurons.
- Architecture details:
When config is None, default 1 layer compressor: Input → Linear → CELU → Output
Hidden layer neurons can be uniform (single neuron count) or varied (list)
- Parameters:
input_dim (int) – The dimensionality of the input data
output_dim – The dimensionality of the output data
hidden_neurons (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 1
config (list[dict], optional) – A list of the module layer configuration dictionaries
Methods
Sequentially forward through all modules in model_list to transform input tensor.
Attributes