MATLAB: How to fix constant iteration in neural networks

neural network

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

Best Answer

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