Created
January 5, 2020 13:51
-
-
Save yptheangel/0a393e669ab2be98df1c65993fe31964 to your computer and use it in GitHub Desktop.
TensorflowCallbackExample
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
class myCallback(tf.keras.callbacks.Callback): | |
def on_epoch_end(self, epoch, logs={}): | |
if(logs.get('acc')>0.6): | |
print("\nReached 60% accuracy so cancelling training!") | |
self.model.stop_training = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment