[NEURAL NETWORK] How can I make MSE be the same in different trying times ?
古いコメントを表示
The Mean Square Error (MSE) turns out to be different each time I train the network.
_net = feedforwardnet(10,'trainlm');
net.divideParam.trainRatio=1;
net.divideParam.valRatio=0;
net.divideParam.testRatio=0;
net.trainParam.epochs=10;
[net,tr]=train(net2,x,t);
MSE=sumsqr(net2(x)-t)_
I guess it come from net2.initFcn caused this problem. How do I change it to make MSE becomes the same ?
採用された回答
その他の回答 (1 件)
Greg Heath
2014 年 12 月 2 日
0 投票
Remove the underscores at the beginning and end.
Use net.divideFcn = 'dividetrain' to automatically get the (1/0/0) data division
I hope you don't use 10 epochs for serious work
net2 in never defined
MSE depends on net, not net2
sumsq yields SSE, not MSE
For repeatability you have to set the initial state of the random number generator before data divisions and weight initializations.
MSE is scale dependent. Better to normalize by the average target variance
Hope this helps.
Thank you for formerly accepting my answer
Greg
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!