utils.model_storage

The hbbrain.utils.model_storage submodule implements various functions to store a trained model to the local file and load it from the file.

hbbrain.utils.model_storage.load_model(filename)[source]

Load a stored model from a file

Parameters:
filenamestr

The path to file storing the trained model.

Returns:
modelobject

An model stored in the file.

hbbrain.utils.model_storage.load_multi_models(filename)[source]

Deserialize a file containing many trained models

Parameters:
filenamestr

The path to file storing the trained model.

Yields:
objects

An iterator through many models stored in the file.

hbbrain.utils.model_storage.store_model(model, filename)[source]

Store an trained model or a list of trained models to the file

Parameters:
modelobject

A trained model or a list of the trained models needs to store.

filenamestr

The path to file storing the trained models.

Returns:
None.