Which epoch is the training result of the train function

7 次查看(过去 30 天)
I see a strange (training) performance degradation at the moment in a neural network structure that I am using. Quick question:
What epoch does the trained network that the train function returns belong to? Always the best epoch? or the very last one? Because currently I see the best epoch somewhere in the middle of my training and then the performance decreases significantly. If the very last epoch was output, then I know why my performance is decreasing.

采纳的回答

Rohit Pappu
Rohit Pappu 2020-8-31
The train function returns the last epoch by default. This behaviour can be modified by using the ValidationPatience argument under training option. There are some examples demonstrating the use of the of training option which can be accessed here.
  1 个评论
RH
RH 2020-8-31
Thank you for your response. I am training shallow neural networks, is this options also available for these applications? Furthermore I am a little surprised by this information, what is the logic behind not returning the best training result?

请先登录,再进行评论。

更多回答(1 个)

David Franco
David Franco 2020-8-31
For a shallow neural network you can use the code:
net.trainParam.max_fail = x
where x is the number of fails in increase the performance.
This is the validation fail parameter. The default value is 6.
  1 个评论
RH
RH 2020-8-31
Thanks. What I am looking for is an option that makes Matlab save the best result and perhaps also the last one, so that the best performance is not lost. Does this not exist?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by