Saving and loading models

Maui models may be saved to disk, so that they may be loaded again at a later time.

Saving a trained model to disk

Saving a model to disk involves saving two files to a target directory. These files store the model weights and the maui parameters (the arguments the maui model was instantiated with). The Maui Class implements a the save function

The function takes one required parameter, the destination directory where the two files will be saved. It is called directly on a maui model, like

maui_model.save('/path/to/dir')

Loading a model from disk

Loading a model involves instantiating a new Maui instance using the parameters that were used on the model that is saved to disk, and then populating the weights of the model to the previously trained weights. Once a model is loaded, it can be used to transform new data to the latent space, or it can be trained further. The Maui Class has a static function to load a model from disk

It is called directly on the Maui class, like

maui.Maui.load('/path/to/dir')