Skip to content

Instantly share code, notes, and snippets.

@weklund
Created November 11, 2018 16:43
Show Gist options
  • Save weklund/4aba29bb6ea9fce22bea62d26c560616 to your computer and use it in GitHub Desktop.
Save weklund/4aba29bb6ea9fce22bea62d26c560616 to your computer and use it in GitHub Desktop.
from keras.callbacks import ModelCheckpoint
checkpoint_inception = ModelCheckpoint(
save_best_only = True,
verbose = 1,
filepath = 'saved_models/weights.best.from_inception_resnet_v2.hdf5'
)
model.fit(
train_features_inception,
train_labels,
epochs=35,
batch_size= 64,
validation_data=(valid_features_inception, valid_labels), callbacks=[checkpoint_inception], verbose=1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment