FeedForward Network Module
Feedforward network components for TE regression baselines.
- scripts.models.feedforward_network.get_activation_module(activation_name)[source]
Return the activation layer instance for one configured activation name.
- Parameters:
activation_name (str) – Case-insensitive activation identifier supported by the repository feedforward baselines.
- Returns:
A newly instantiated PyTorch activation module.
- Raises:
AssertionError – If the requested activation name is not supported by the repository activation map.
- Return type:
Module
- class scripts.models.feedforward_network.FeedForwardNetwork(input_size, hidden_size, output_size=1, activation_name='GELU', dropout_probability=0.10, use_layer_norm=True)[source]
Dense multilayer perceptron used by the static TE regression baselines.
The network builds a stack of linear layers followed by optional layer normalization, one activation per hidden layer, and optional dropout. The final layer maps the last hidden representation to the scalar or vector regression output configured by
output_size.- Parameters:
input_size (int)
hidden_size (list[int])
output_size (int)
activation_name (str)
dropout_probability (float)
use_layer_norm (bool)
- __init__(input_size, hidden_size, output_size=1, activation_name='GELU', dropout_probability=0.10, use_layer_norm=True)[source]
Initialize the feedforward regression backbone.
- Parameters:
input_size (int) – Number of scalar input features provided to the model.
hidden_size (list[int]) – Hidden-layer widths in execution order.
output_size (int) – Number of regression outputs produced by the final linear layer.
activation_name (str) – Activation identifier resolved through
get_activation_module().dropout_probability (float) – Dropout probability applied after each hidden activation when greater than zero.
use_layer_norm (bool) – Whether to insert
LayerNormafter each hidden linear layer.
- Raises:
AssertionError – If an invalid architecture value is provided.
- Return type:
None