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

1 回表示 (過去 30 日間)
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....

採用された回答

Greg Heath
Greg Heath 2015 年 2 月 5 日
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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by