how to fix constant iteration in neural networks

조회 수: 2 (최근 30일)
Thirunavukkarasu
Thirunavukkarasu 2014년 9월 16일
댓글: Greg Heath 2017년 12월 22일
when i am trying to train my neural network using levenberg marquardt algorithm it shows different iteration at each times how do i fix my neural network with constant iteration period
  댓글 수: 3
Thirunavukkarasu
Thirunavukkarasu 2014년 9월 19일
epochs
Shreeja Shetty
Shreeja Shetty 2017년 7월 20일
I am currently facing a similar issue as mentioned above. Can someone please provide a solution.

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

채택된 답변

Greg Heath
Greg Heath 2014년 9월 19일
When you train your net again, the random number generator is in a different state. Therefore you will have a different trn/val/tst split AND a different set of initial weights. The training will stop according to one of several stopping rules including
1. performance goal achieved
2. maximum epochs reached
3. minimum gradient achieved
4. maximum mu reached
5. validation stop (validation performance reaches a local maximum)
[ net tr y e ] = train(net,x,t) % e=t-y
stopcriterion = tr.stop
or, if you are training in a double for loop
stopcriteria{i,j} = tr.stop
This is great because all are chosen to optimize your performance. That is why every time I try a new candidate for H=number of hidden nodes, I design at least Ntrials = 10 nets. So, if I am considering 10 different values for H, I will have 100 designs which I summarize in 3 10 by10 matrices for training, validation and test performance.
The best net is determined from the nontraining validation set performance (smaller values of H are preferred) and an unbiased estimate of unseen nontraining data performance is obtained from the test set performance.
Hope this helps.
Thank you for officially choosing my answer
Greg

추가 답변 (2개)

Greg Heath
Greg Heath 2014년 9월 17일
If you train multiple nets in a loop you can duplicate previous runs by keeping track of the state of the random number generator. That is why I always specify an initial random number state, before the outer loop. For examples, search on
greg rng(0)
or
greg rng('default')
Hope this helps.
Thank you for formally accepting my answer
Greg
  댓글 수: 5
Parul Singh
Parul Singh 2017년 4월 26일
rng default- net gives different outputs each time it is run
rng (variable number) - number of iterations remain the same at 1000
We want to vary the number of iterations to achieve best output and then for a constant number of iterations, we want the network to get the same output each time it is nrun.
Please help.
Greg Heath
Greg Heath 2017년 7월 20일
Given what I have learned in 37 years of NN design, what you want to do is illogical. Please reread what I have written.
Greg

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


Cesare Trematore
Cesare Trematore 2017년 12월 19일
I do not know if I fully agree. I was running a pattern recognition neural network with the trainbr option. The train perfomance kept improving up to 1000 epochs, but after about 200 epochs the test perfomance started worsening. In this cases would be useful to have the option to stop the training after a prefixed number of epochs.
  댓글 수: 1
Greg Heath
Greg Heath 2017년 12월 22일
That option is available.
However, why in the world are you using trainbr for pattern recognition?
What happens when you use patternet with all defaults except number of hidden nodes and initial RNG state?
Search the NEWSGROUP and ANSWERS with
greg patternnet
Hope this helps.
Greg

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

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by