hyrax.models.model_utils#
Utility functions for model operations.
Attributes#
Functions#
|
Load model weights from the file indicated by the configuration |
Module Contents#
- load_model_weights(config: dict, model, verb: str)[source]#
Load model weights from the file indicated by the configuration or from the most recent training run if no file is specified.
This function updates the config dict to track which weights file was actually used.
- Parameters:
config (dict) – Full runtime configuration
model (nn.Module) – The model class to load weights into
verb (str) – The verb name (e.g., “infer”, “test”) for finding weights file in config
- Raises:
RuntimeError – If the weights file cannot be found or does not load properly