How to save the best model during neural network training?
Mostrar comentarios más antiguos
During the NN training there is multiple validation, in some of the epoch the validation accuracy is high. However, maybe due to the overfitting the val accuracy drops after more training. How do I save the model which have the best validation accuracy?
2 comentarios
KSSV
el 21 de Oct. de 2022
How you are training it?
wanting wang
el 21 de Oct. de 2022
Respuestas (1)
Antoni Woss
el 21 de Oct. de 2022
0 votos
You can choose to return the network with the optimal validation accuracy by specifying the 'OutputNetwork' name-value argument with the value 'best-validation-loss'. This will return the network corresponding to the training iteration with the lowest validation loss.
For more information on the validation options, take a look at the following documentation page: https://www.mathworks.com/help/deeplearning/ref/trainingoptions.html
Categorías
Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!