Skip to content

Instantly share code, notes, and snippets.

@sdcubber
Created September 15, 2018 12:31
Show Gist options
  • Save sdcubber/063bba29c8a73e2a6ac3c10789b4f128 to your computer and use it in GitHub Desktop.
Save sdcubber/063bba29c8a73e2a6ac3c10789b4f128 to your computer and use it in GitHub Desktop.
from keras import callbacks
callbacks = [
callbacks.EarlyStopping(monitor='val_loss', patience=2, verbose=1)
]
history = network.fit(train_images,
train_labels,
epochs=500,
batch_size=128,
validation_data=(val_images, val_labels),
callbacks=callbacks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment