Skip to content

Instantly share code, notes, and snippets.

@ResidentMario
Created March 28, 2019 02:26
Show Gist options
  • Select an option

  • Save ResidentMario/0ca36dfc6851c894ac9ddca25ef3b4d8 to your computer and use it in GitHub Desktop.

Select an option

Save ResidentMario/0ca36dfc6851c894ac9ddca25ef3b4d8 to your computer and use it in GitHub Desktop.
# fit the model
model.fit_generator(
train_generator,
steps_per_epoch=len(train_generator.filenames) // batch_size,
epochs=20,
validation_data=validation_generator,
validation_steps=len(train_generator.filenames) // batch_size,
callbacks=[
EarlyStopping(patience=3, restore_best_weights=True),
ReduceLROnPlateau(patience=2)
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment