Does train function return neural network with the weights of last epoch or the weights of the model with the smallest loss of all epochs?

3 ビュー (過去 30 日間)
I use the training function "traingd" to train a shallow neural network by using:
[trainedNet,tr] = train(net,X,T)
When the training is done, to which epoch/iteration of the training does the neural network, which is returned as trainedNet by the "train" function, correspond?
Is it the network with the weights of the last epoch of the training before stopping or is it the network with the smallest training error which occured at a certain epoch during the training?
Thanks in advance!
I use MATLAB 2013 and MATLAB 2015 with the neural network toolbox.

採用された回答

Srivardhan Gadila
Srivardhan Gadila 2020 年 9 月 30 日
According to it "When the validation error increases for a specified number of iterations (net.trainParam.max_fail), the training is stopped, and the weights and biases at the minimum of the validation error are returned."
For more information on the "net.trainParam.max_fail" parameter, enter the following in command window:
help nnparam.max_fail

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by