Search⌘ K

Using Models

Explore how to effectively use trained deep learning models in Keras by saving models with .h5 files, reloading them, and making predictions on new data. Understand the practical steps for file handling and the importance of preprocessing test features to ensure accurate prediction results.

There are three operations that can be performed in order to use the trained models:

  1. Save
  2. Reload
  3. Predict

πŸ’Ύ Save the model

Models can be saved using the save method using .h5 extension.

Python 3.5
model.save('model.h5')

πŸ“ Note: The Educative code widget provides the option of downloading the file when you write the save function. When working in a local workspace, the file is saved in the current working directory or ...