Effacer les filtres
Effacer les filtres

How to store the randomly generated initial weights while using fitnet function of ANN toolbox?

2 vues (au cours des 30 derniers jours)
While using "fitnet" function of ANN toolbox, the initial weights are generated by this function itself and that doesn’t appear anywhere. Can anyone suggest me how to store these randomly generated initial weights by fitnet function?
More specifically: "fitnet" function starts with Initial weights (at 0 epoch) to optimized weights (lets at 10th epochs) by using let’s say "traingdm". So I want to store Initial weights (at 0 epoch).
Thanks for your help....

Réponse acceptée

Greg Heath
Greg Heath le 5 Fév 2015
Cut and paste into the command line:
[x,t] = simplefit_dataset;
net = fitnet(10); % Inputs and Outputs are NOT defined here
view(net)
WB = getwb(net) % Only net.b{1} = zeros(10,1)is defined
rng(4151941) % Initialize the RNG so that results can be duplicated
net = configure(net,x,t);% Now inputs and outputs are defined and ready to train
IW = net.IW{1,1}
b1 = net.b{1}
LW = net.LW{2,1}
b2 = net.b{2}
Hope this helps.
Thank you for formally accepting my answer
Greg

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by