Early topping: what should we monitor?

39 views
Skip to first unread message

Marcelino Borges

unread,
Feb 26, 2021, 1:00:33 PM2/26/21
to Keras-users
Hi.

In general, when we are developing Neural network models, we want to prevent overfitting and we would like to preserve the best state of the model during the training.

Du to this, in general, we use early stopping monitoring metrics on the validation dataset.

However, it is not clear for me which metric is the best for monitoring. In general, I use "val_loss", however, in practice, we are interested in the general accuracy of the model. Due to this, it seems to be better to monitor "val_accuracy".

What do you think about this?

Ngoc Phuong Chau

unread,
Feb 26, 2021, 2:05:38 PM2/26/21
to Marcelino Borges, Keras-users
Hi,
I hope it is good enough.

Thanks,
Phuong Ngoc Chau

PhD student.
HP:+84 962647449 (Vietnam)
      +47 47737529 (Norway)


--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/CANpcTFqhjwh03vCP%2Bk2Op7oUSW10Dn0zAqWN9Q9KcrBCf6YpaA%40mail.gmail.com.

Marcelino Borges

unread,
Feb 27, 2021, 8:49:38 PM2/27/21
to Ngoc Phuong Chau, Keras-users
Hi.

Thank you for the suggestion.
But actually I was more concerned with the best way to monitoring the training of our models.
What is the desirable way to set up the early stopping? Which metric is the best to be monitored?

Best regards.

Lance Norskog

unread,
Feb 28, 2021, 9:39:51 PM2/28/21
to Marcelino Borges, Ngoc Phuong Chau, Keras-users
val_loss generally gives a better read than val_accuracy. For some model architectures, val_accuracy jumps up and down across epochs. For other architectures, val_loss jumps up and down.

You would need to show us the model design and charts that you are seeing.





--
Lance Norskog
lance....@gmail.com
Redwood City, CA

Marcelino Borges

unread,
Mar 2, 2021, 10:40:39 PM3/2/21
to Lance Norskog, Ngoc Phuong Chau, Keras-users
Hi Lance.
Thank you for your comments.
I'm sending the learning curves, plotting accuracy and loss.
What insights can we have from analyzing them?

Best regards.
loss.png
accuracy.png

Ngoc Phuong Chau

unread,
Mar 3, 2021, 1:14:38 AM3/3/21
to Marcelino Borges, Lance Norskog, Keras-users
From the pictures, your model can not capture the trend. You can change the number of cells, layers, even change to another model.
Hope this help.
Reply all
Reply to author
Forward
0 new messages