Can I use parameters of different network training functions with each other?
Show older comments
If I am using trainscg, does it work to use parameters that are usually used for other network training functions? Like, can I use: net.performParam.regularization = B; net.trainParam.lr = A; For trainscg not just trainlm? Or does it have to be only these: (from https://www.mathworks.com/help/nnet/ref/trainscg.html)
- net.trainParam.epochs
- net.trainParam.show
- net.trainParam.showCommandLine
- net.trainParam.showWindow
- net.trainParam.goal
- net.trainParam.time
- net.trainParam.max_fail
- net.trainParam.sigma
- net.trainParam.lambda
I know it technically runs, but does it affect the result to use ones that are not in the above list/link?
Answers (2)
Greg Heath
on 3 Feb 2018
0 votes
You can answer your own question via trial and error.
Greg
2 Comments
Nis Jar
on 28 Feb 2018
I had been using trial and error and wanted to know if my improved results were random or not. So helpful.
Greg Heath
on 1 Mar 2018
In order to make design comparisons valid, you should always initialize the RNG to the same initial state. Examples:
rng(0)
rng('default') % Same as above
rng(4151941) % A birth day
Greg
Greg Heath
on 2 Mar 2018
My approach for successfully designing hundreds of nets is straightforward:
Accept all defaults except
1. Initial state of the random number generator.
rng(initial_state) % Typically, I use rng(0)
2. Outer loop over No of hidden nodes H:
for h = Hmin:dH:Hmax
% Typically, 10 equally spaced H values subject to the constraint
No. unknown weights+biases <= No. training eqns
3. Inner loop over Ntrials random initial weight settings
for i = 1:Ntrials
% Typically, Ntrials = 10. Rarely had to use 20 or 30
I have posted hundreds of examples in the NEWSGROUP and ANSWERS.
Thank you for formally accepting my answer
Greg
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!