Created
June 16, 2022 18:15
-
-
Save SmiffyKMc/44244325f7dad5447e46e91c8c16581c to your computer and use it in GitHub Desktop.
Fitting the model and allowing for saving of the model based on the best validation loss
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
callbacks = [ | |
keras.callbacks.ModelCheckpoint( | |
filepath=f"{hotDogDir}hotdog_classifier_v1.keras", | |
monitor="val_loss", | |
save_best_only=True | |
) | |
] | |
history = model.fit( | |
train_dataset, | |
epochs=30, | |
validation_data=validation_dataset, | |
callbacks=callbacks | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment