nip.model_cache.load_cached_model_state_dicts#
- nip.model_cache.load_cached_model_state_dicts(models: dict[str, Module], hyper_params: HyperParameters | dict, subdir: str)[source]#
Load the state dict of cached models into models.
- Parameters:
models (dict[str, torch.nn.Module]) – The models to load the state dicts into. The keys are the names of the models, and the values are the models themselves.
hyper_params (HyperParameters | dict) – The parameters which specify the cached models to load.
subdir (str) – The subdirectory in which to look for the saved models.
- Raises:
ModelNotFoundError – If a model file is not found.