Deep Learning with Keras - Saving Model

We will save the trained model in our local drive in the models folder in our current working directory. To save the model, run the following code −

directory = "./models/"
name = 'handwrittendigitrecognition.h5'
path = os.path.join(save_dir, name)
print('Saved trained model at %s ' % path)

The output after running the code is shown below −


Now, as you have saved a trained model, you may use it later on for processing your unknown data.

Input your Topic Name and press Enter.