Skip to content

Instantly share code, notes, and snippets.


kamal2230/ Secret

Created October 11, 2020 06:54
What would you like to do?
model.compile(loss = 'categorical_crossentropy',
optimizer = 'adam',
metrics = ['accuracy'])
class myCallback(tf.keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs={}):
print("\nReached >95% accuracy so cancelling 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