Skip to content

Commit

Permalink
Bug fix: monitor string must be val_accuracy
Browse files Browse the repository at this point in the history
Without this fix, the model will not save, and the code will fail after the first pass of INCV when it tries to load a model that was not saved due to callback failure. This is a standard fix (see: tensorflow/tensorflow#33163).
  • Loading branch information
cgnorthcutt committed Feb 2, 2020
1 parent bcb84cb commit e92286f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion INCV_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def INCV_lr_schedule(epoch):
batch_size = batch_size),
epochs = INCV_epochs,
validation_data=(x_train[val1_idx,:], y_train_noisy[val1_idx,:]),
callbacks=[ModelCheckpoint(filepath=filepath_INCV, monitor='val_acc', verbose=1, save_best_only=INCV_save_best),
callbacks=[ModelCheckpoint(filepath=filepath_INCV, monitor='val_accuracy', verbose=1, save_best_only=INCV_save_best),
noisy_acc,
INCV_lr_callback])
# Select samples of 'True' prediction
Expand Down

0 comments on commit e92286f

Please sign in to comment.