Skip to content

Instantly share code, notes, and snippets.

@IamRash-7
Created August 22, 2021 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IamRash-7/4e224dd4ca64561d03050435d22e9d35 to your computer and use it in GitHub Desktop.
Save IamRash-7/4e224dd4ca64561d03050435d22e9d35 to your computer and use it in GitHub Desktop.
# To save the best model
checkpointer = ModelCheckpoint(filepath='weights.best.model.hdf5', verbose=2, save_best_only=True)
# To reduce learning rate dynamically
lr_reduction = ReduceLROnPlateau(monitor='val_loss', patience=5, verbose=2, factor=0.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment