Skip to content

Instantly share code, notes, and snippets.

@iavinas
Created May 24, 2020 11:03
Show Gist options
  • Save iavinas/c3903b7bdd6990eb1aeaea724775b00a to your computer and use it in GitHub Desktop.
Save iavinas/c3903b7bdd6990eb1aeaea724775b00a to your computer and use it in GitHub Desktop.
VGG16_model.compile(loss='categorical_crossentropy', optimizer='rmsprop', metrics=['accuracy'])
checkpointer = ModelCheckpoint(filepath='saved_models/weights.best.VGG16.hdf5',
verbose=1, save_best_only=True)
VGG16_model.fit(train_VGG16, train_targets,
validation_data=(valid_VGG16, valid_targets),
epochs=20, batch_size=20, callbacks=[checkpointer], verbose=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment