Last active
December 27, 2019 16:58
-
-
Save Rishit-dagli/9fd816ba986e67827031df8ecc9bf6a1 to your computer and use it in GitHub Desktop.
This file contains 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
class myCallback(tf.keras.callbacks.Callback): | |
def on_epoch_end(self, epoch, logs = {}): | |
if logs.get('loss') < 0.7: | |
print("\n Low loss so cancelling the training") | |
self.model.stop_training = True | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment