Skip to content

Instantly share code, notes, and snippets.

@emuccino
Created July 1, 2020 04:34
Show Gist options
  • Save emuccino/32b30e1a9a15c7f8d04562bdbd27da49 to your computer and use it in GitHub Desktop.
Save emuccino/32b30e1a9a15c7f8d04562bdbd27da49 to your computer and use it in GitHub Desktop.
from tensorflow.keras.callbacks import EarlyStopping
early_stop = EarlyStopping(
monitor='val_loss', min_delta=0, patience=5, verbose=0, mode='auto',
baseline=None, restore_best_weights=True)
model.fit(x_train, {device:y_train for device in device_names},
batch_size=64,
epochs=1000,
verbose=1,
validation_data=(x_test, {device:y_test for device in device_names}),callbacks=[early_stop])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment