Created
October 10, 2020 20:27
-
-
Save esenthil2018/aa3e1ac9c04c71daf39b48cc7214745f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Save the model using pickle | |
import pickle | |
# save the model to disk | |
pickle.dump(model, open(model_file_path, 'wb')) | |
#Load the model | |
model = pickle.load(open(model_file_path, 'rb')) | |
#Saving a Keras model | |
# Calling `save('my_model')` creates a SavedModel folder `my_model`. | |
model.save("my_model") | |
#Load a Keras Model | |
# It can be used to reconstruct the model identically. | |
reconstructed_model = keras.models.load_model("my_model") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment