From the course: Deep Learning: Getting Started

Saving and loading models

From the course: Deep Learning: Getting Started

Saving and loading models

- In the machine learning world, models are trained in a different environment than where they are used for inference. How do we store, move and load models between environments. In code.4 file, We have an example for storing and loading deep learning models. In order to save a model, we use the saved method to save the model architecture, parameters and other information to disk. Here we saved the contents to iris save, which is a directory under which the model elements are saved. We can load the model back with the load model function. Once loaded, we can print the summary and check the model. Let's run this code and review the results. We can now see that the model has been saved and reloaded. We can also explore the contents of Iris save, the model is saved here in binary format with all the format and metadata under the root directory of the exercise files. To copy the model, we need to copy the end data root directory and move it to the destination.

Contents