Skip to content

Instantly share code, notes, and snippets.

@jeetaf
Created June 28, 2021 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeetaf/5212133440774b4a93557f8b035fc25e to your computer and use it in GitHub Desktop.
Save jeetaf/5212133440774b4a93557f8b035fc25e to your computer and use it in GitHub Desktop.
model = build_model()
# The patience parameter is the amount of epochs to check for improvement
early_stop = keras.callbacks.EarlyStopping(monitor='val_loss', patience=10)
history = model.fit(normed_train_data, train_labels, epochs=EPOCHS,
validation_split = 0.2, verbose=0, callbacks=[early_stop, PrintDot()])
plot_history(history)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment