Weights during network training

Dear users,
I am training a neural network using traingda algortithm. Is it possible to access the weights of the network at the intermediate epochs? With the commands net.IW, net.LW, and net.b I can access the weights only at the end of the training. I would like to access all the intermediate weights.
Any help is really appreciated! Thank you.
Mauro

답변 (3개)

Greg Heath
Greg Heath 2011년 11월 23일

0 개 추천

You will have to loop over an inner one-epoch loop.
Hope this helps.
Greg
Mauro
Mauro 2011년 11월 23일

0 개 추천

Dear Greg, thank you for your reply. I am not sure I have understood what you mean. Can you give me more details, please? How can I loop over an inner one-epoch loop?
Thank you,
Mauro
Greg Heath
Greg Heath 2011년 12월 1일

0 개 추천

rand('state',0);
net = newff(p,t,H);
IW = net.IW{1,1};
b1 = net.b{1};
IW = net.LW{2,1};
b2 = net.b{2};
% Store and/or plot the weight values
MSEgoal = mean(var(t'))/100
Nepochs = 1
Nloops = 100
net.trainParam.goal = MSEgoal;
net.trainParam.epochs = Nepochs;
net.trainParam.show = inf;
for i = 1:Nloops
net = train(net,p,t);
IW = net.IW{1,1};
b1 = net.b{1};
LW = net.LW{2,1};
b2 = net.b{2};
% Update storage and/or plots
end
REPRODUCIBILITY WARNING:
Using Nepochs = 100 with Nloops = 1 yields different results because each call of TRAIN reinitializes internal parameters.
Hope this helps.
Greg

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2011년 11월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by