Skip to content

Commit

Permalink
Fixed metric that is being used for early stopping and validation (va…
Browse files Browse the repository at this point in the history
…l_acc -> val_accuracy).
  • Loading branch information
apacha committed Mar 6, 2020
1 parent 7461fa2 commit 65f1706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ModelTrainer/TrainModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def train_model(dataset_directory: str, model_name: str, stroke_thicknesses: Lis
start_of_training = datetime.date.today()
best_model_path = "{0}_{1}.h5".format(start_of_training, training_configuration.name())

monitor_variable = 'val_acc'
monitor_variable = 'val_accuracy'
if training_configuration.performs_localization():
monitor_variable = 'val_output_class_acc'
monitor_variable = 'val_output_class_accuracy'

model_checkpoint = ModelCheckpoint(best_model_path, monitor=monitor_variable, save_best_only=True, verbose=1)
early_stop = EarlyStopping(monitor=monitor_variable,
Expand Down

0 comments on commit 65f1706

Please sign in to comment.