Can a user-defined function be called after weight/bias updates during training?
Show older comments
Hello.
I was wondering if there's a way to specify a function to be executed after weight/bias updates when calling train() or adapt()?
My current solution is to call train multiple times with net.trainParam.epochs=1, but this appears to negatively impact learning.
Thanks
-- Jeff
2 Comments
Greg Heath
on 31 Oct 2012
What is this function supposed todo?
jeffrey cockburn
on 1 Nov 2012
Accepted Answer
More Answers (1)
Greg Heath
on 31 Oct 2012
The reason the stopping/starting negatively impacts learning is because the learning parameters are reinitialized every time train is called. Even if you obtain the final parameters from
net.trainParam: .showWindow, .showCommandLine, .show, .epochs,
.time, .goal, .min_grad, .max_fail, .mu, .mu_dec,
.mu_inc, .mu_max
and/or
tr: .mu, .gradient, .val_fail, etc
there is no way to use them to initialize the next call of train unless the function is modified.
Perhaps that will be available in a new version. (I've suggested that to the TBX author.)
Hope this helps.
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!