Skip to content

Instantly share code, notes, and snippets.

@yptheangel
Created January 5, 2020 13:51
Show Gist options
  • Save yptheangel/0a393e669ab2be98df1c65993fe31964 to your computer and use it in GitHub Desktop.
Save yptheangel/0a393e669ab2be98df1c65993fe31964 to your computer and use it in GitHub Desktop.
TensorflowCallbackExample
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