Deep learning using CNN - question about training.
2 次查看(过去 30 天)
显示 更早的评论
I have a question about a CNN I'm training. during the training everything goes well, with high accuracy results on training and validation sets. however once I stop training the model, the final model has much much inferior accuracy returned to me (see the image below).
Now I have two questions: 1) obviously, why does it happen? I'm expecting to get a model with on par performance on both training and validation sets, with that of the plot. 2) After I manually stop the training process to finish the training at a certain point, it takes quite a long time for the model to be returned (anywhere between 5 to 50 mins w.r.t the size of the data and other parameters such as depth of the network and etc.). Why does this happen?
0 个评论
回答(1 个)
Johannes Bergstrom
2018-11-26
Does you network use batch normalization layers?
After training finishes, trainNetwork loops thorugh the whole data set to calculate the batch normalization statistics required to create a network ready for prediction. This answers your question 2) - why it takes so long.
But also, you train for much less than one epoch, which means that the data seen so far by the network might not be representative of the training nor validation sets.
Try making sure that you
2. Train for multiple epochs
Finally, looking at the large 'bump' in the training loss for the very first 10 iterations, it seems like your learning rate is too high.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel and Cloud 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!