Skip to content

The example shows how to save and load the checkpoint of the model

Notifications You must be signed in to change notification settings

hawrot/checkpoint-keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Checkpoint Keras

The example implementation of Keras model shows how the save a checkpoint of trained model and then load it from the file.

Save the checkpoint

‌checkpoint_cb = keras.callbacks.ModelCheckpoint("YOURS-MODEL-NAME.h5", save_best_only=True)

Checkpoint callback after each epoch

‌history = model.fit(X_train, y_train, epochs = 50, validation_data=(X_valid, y_valid), callbacks=[checkpoint_cb])

Load the model

loadedModel = keras.models.load_model("YOURS-MODEL-NAME.h5")

About

The example shows how to save and load the checkpoint of the model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages