Different results by backpropagation algorithm using different MatLab versions (2008 and 2010)
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I usually use the Neural Network toolbox of the Matlab version of 2008a. However in this moment I’m working with a different computer with 2010b version and my net doesn’t give me exactly the same results. I’ve notest that some functions are obsolete and I’m afraid that there are other reasons for this difference that I’m not aware (or other functions called inside other functions…). For example, 2008 version still uses “calcgrad” that disappear in 2010 version, which uses “staticderiv”…
The functions more relevant are:
net = newff(P1,T1,H,{},'trainscg');
net.layers{:}.initFcn='initwb';
net.inputWeights{:,:}.initFcn='rands';
net.layerWeights{:,:}.initFcn='rands';
net.biases{:}.initFcn='rands';
net.performFcn='mse';
[net,tr,Y1,E1] = train(net,P1,T1);
I updated newff as recommended.
Somebody has any idea why are my results different?
Thank you.
0 个评论
采纳的回答
Mark Hudson Beale
2011-4-27
First, I assume you are setting the random seed before running this code to try and reproduce exact results? Otherwise, every run will be different.
If that doesn't work, then exact results may be difficult to replicate. Bug fixes, algorithm enhancements, or even the order of calculations that change between versions, can make a difference in the final trained network.
You could try checking the weights after setting the random seed to consistent value and creating the network in both version, before training, to see if the change is happening in initialization or training.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!