PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

How can I determine if my model overfits?

Open Yasminbr opened this issue 3 years ago • 4 comments

Hi, while I train , and do validation I get the validation accuracy and the training loss, those two are not enough to determine if my model overfits or not (I need to have the training acc or better, the validation loss) Unfortunately , I don't find a way to have this information, would be happy to get some help. I am using visualdl of course.

Thank you.

Yasminbr avatar Jun 19 '22 08:06 Yasminbr

You can check the loss curve by visualdl. If the training loss keeps decreasing and the validation accuracy is not be improved, the model is overfit. However, PaddleSeg saves the model params with best validation accuracy in the training stage. You can load the best params to export the inference model.

juncaipeng avatar Jun 20 '22 03:06 juncaipeng

请问哪部分代码式edgeflow模型训练部分的代码?

lililikaixu avatar Jun 21 '22 07:06 lililikaixu

请问哪部分代码式edgeflow模型训练部分的代码?

请单独开一个pr,描述你的问题吧。

juncaipeng avatar Jun 21 '22 08:06 juncaipeng

You can check the loss curve by visualdl. If the training loss keeps decreasing and the validation accuracy is not be improved, the model is overfit. However, PaddleSeg saves the model params with best validation accuracy in the training stage. You can load the best params to export the inference model.

that is true if you have the accuracy of the training set not of the validation. I assume the paddle model misses two parameters - validation loss and training accuracy , those parameters are very important. The performance can be measured using the percentage of accuracy observed in both data sets to conclude on the presence of overfitting. If the model performs better on the training set than on the test set, it means that the model is likely overfitting.

Yasminbr avatar Jun 22 '22 08:06 Yasminbr