Neural network toolbox initialize the weights and biases (accepted answer: control random number generator)
Show older comments
Dear all,
I have a problem when using the neural network toolbox. For a given data set, each training results in a different network (with different weights and biases). I learned that it is due to the random data division (which I fixed in my code) and the random initialization of the weights and biases. Instead of using the default initFcn (which is rands), I tried the other functions, i.e. midpoint, initzero. However, I have problems with both functions:
1. when using initzero, the training always stops at the 2nd iteration with horrible accuracy. Basically, almost all the weights and biases are zeros.
2. when using midpoint, I receive an error, which is due to the default net.inputWeights{i,j}.weightFcn (dotprod). I tried some other options (dist, mandist,..) without success.
So, could you please help me with some suggestions to overcome this problem? I just want to be able to reproduce the same training and obtain the same network with this toolbox. The code is attached herein.
thank you very much in advance.
cheers. Chu
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!