How can we recover the network state at iteration T

조회 수: 2 (최근 30일)
Arjun Desai
Arjun Desai 2018년 5월 25일
댓글: Torsten K 2020년 10월 16일
I am using a validation set to determine stop training when the validation loss stops decreasing. I have my validation patience as 3. Assuming that my networks stops training when it has surpassed this patience threshold, during the final 3 validation steps of my network would have been overfitting.
As a result, I want to recover the network state at the step that produced the minimum validation loss. Is there a way to do this?
  댓글 수: 2
Roberto
Roberto 2019년 1월 15일
Hi Arjun. I have the same problem. Did you find a solution?
My current solution is keeping track of the best iterations and then re-train the network with the same rng seed and max epoch set in order to stop the training wher the validation loss reached the minimum in the previous training. It's an horrible solution but it's the only way I've found.
Torsten K
Torsten K 2020년 10월 16일
Hi Roberto,
I also have the same problem. Did you find a solution yet? If so, I am very interested how you solved the problem!
Regards
Torsten

댓글을 달려면 로그인하십시오.

답변 (1개)

Greg Heath
Greg Heath 2018년 5월 26일
In the distant past I'm pretty sure that I have checked, by using the error plot, that it is done automatically.
Thank you for formally accepting this answer
Greg.
  댓글 수: 2
Arjun Desai
Arjun Desai 2018년 5월 31일
Hi Greg, I checked with the Mathworks team, and it seems that this is not the case. In fact, the state pf the network that is accepted is the last state before the training stops.
Greg Heath
Greg Heath 2019년 1월 16일
편집: Greg Heath 2019년 1월 16일
I have not verified this but I have the feeling that, in the long run, the difference between stopping at minval and minval + 6 for 15% of the data is not significant w.r.t. performance on the entire dataset.
Greg

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by