Skip to content

Instantly share code, notes, and snippets.

@Sanlap1997
Created September 21, 2020 14:01
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 Sanlap1997/1b42a1bf0735eaf9d47e0c4f2a8e95be to your computer and use it in GitHub Desktop.
Save Sanlap1997/1b42a1bf0735eaf9d47e0c4f2a8e95be to your computer and use it in GitHub Desktop.
EPOCHS = 25
history = model.fit(train_x,
train_y,
epochs=EPOCHS,
validation_data=(test_x, test_y),
callbacks = [tf.keras.callbacks.EarlyStopping(monitor='val_loss', min_delta=0, patience=10, verbose=0, mode='min'),
tf.keras.callbacks.ModelCheckpoint(model_path,monitor='val_loss', save_best_only=True, mode='min', verbose=0)]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment