Problem determining the best performance weights

2 views (last 30 days)
Hello everybody,
I managed to make a neural network with validation, but after training, the weights that are stored in net.IW are not the most optimal.
As you can see in the picture, the best validation performance is taken when performance is 0.5, although the best is obviously lower.. Additionally, when I stop the training, the weights stored in net.IW are the weights from the last epoch, not from the best.
Does anybody know what is happening? Why don't I have the best epoch stored in net.IW?
Is it possible to obtain the weights from the best epoch by another mean ?
Thanks in advance,
Boris
(I use Perceptron network, with divide function 'dividerand' and train function 'trains')
  1 Comment
Greg Heath
Greg Heath on 25 Jun 2015
What version of the Toolbox are you using? If you post your data, code, and initial random number state
s0 = rng
I will take a look at it.
Greg

Sign in to comment.

Answers (1)

Greg Heath
Greg Heath on 6 Jun 2015
The message at the top of the chart is incorrect.
Clearly, from the graph, the best val epoch is at epoch 35, a local minimum. That is why training was stopped.
If you look at the training record via
tr = tr
you will see that
stopcriterion = tr.stop
is "Validation Stop" and the corresponding trn/val/tst perf values at the bottom
bestperf = tr.best_perf
bestvperf = tr.best_vperf
besttperf = tr.best_tperf
The trn/val/tst indices are also there as well as their perf histories.
All of the weights IW, b and LW are the values at epoch 35.
Their time histories are unavailable.
I suggest you investigate ALL of the quantities in tr to further your understanding. If you have any questions, let us know.
Hope this helps
Thank you for formally accepting my answer
Greg

Tags

Community Treasure Hunt

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

Start Hunting!