Model Factory

This page documents the canonical model-selection entry point used by the training infrastructure to instantiate TE model families from configuration.

Factory helpers that map TE model-type strings to concrete modules.

scripts.models.model_factory.create_model(model_type, model_configuration)[source]

Instantiate one supported TE model from a configuration dictionary.

Parameters:
  • model_type (str) – Canonical model-type string such as feedforward, harmonic_regression, periodic_mlp, or residual_harmonic_mlp.

  • model_configuration (dict[str, Any]) – Model-specific configuration dictionary.

Returns:

Instantiated PyTorch module matching the requested model type.

Return type:

nn.Module

Raises:

ValueError – If model_type does not match one of the supported model families.