keras-team / autokeras

AutoML library for deep learning
http://autokeras.com/
Apache License 2.0
9.16k stars 1.4k forks source link

Bug: "Best val_accuracy So Far" is mistaken for "Best val_loss So Far" #1917

Open baolongnguyenmac opened 7 months ago

baolongnguyenmac commented 7 months ago

Bug Description

When I changed the objective from val_loss to val_accuracy, the value of "Best val_accuracy So Far" was wrong. It displayed the maximum value of loss (only those which were smaller than 1)

# metrics was extracted from file `trial.json`
val_loss = np.array(metrics['list_val_loss'])
max(val_loss[val_loss < 1])

Bug Reproduction

You can try fitting the model with objective='val_loss', then stop the training process and change the objective to val_accuracy and the bug will appear.

I think that any data can be used to re-produce this error.

Expected Behavior

It should print out the accuracy instead of the loss value

Setup Details

Include the details about the versions of: