Created
July 15, 2020 11:57
-
-
Save nitin-bommi/42df63616590d77dbb3efb0845804fbb 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['accuracy']>0.99): | |
print("\n\nAccuracy greater than 99%. Stopping the training") | |
self.model.stop_training = True | |
callbacks = myCallBack() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment