model-how to save and load keras model ?
How to save and load keras model ? The easiest way to save and load keras model is: Save model
1 |
model.save('/user/path-to-dir/saved-model.h5') |
Load model
1 2 |
from keras.models import load_model new_model = load_model('/user/path-to-dir/saved-model.h5') |
This technique of saving the model is very useful. This approach saves: Architecture of the model Weights of the model Training state (like loss, optimizer etc.) State of the optimizer, which… Read More »