osl_dynamics.models.base.legacy#

Loading models saved with osl-dynamics 3.0 to 3.9.

These versions saved a config with different field names and a weights file laid out for a different Keras model. convert_config() renames the fields and load_weights() copies each saved weight into the layer that now holds it.

Functions#

is_legacy(config_dict)

Was the config saved with osl-dynamics 3.9 or earlier?

convert_config(config_dict, fields)

Convert a config saved with osl-dynamics 3.0 to 3.9.

load_weights(keras_model, filepath)

Load weights saved with osl-dynamics 3.0 to 3.9.