Neural Network keep best weight and how to use without training

3 views (last 30 days)
i have a narnet and i keep the value of weights.
feedbackDelays = 1:5;
hiddenLayerSize = i;
net = narnet(feedbackDelays,hiddenLayerSize,'open',trainFcn);
[inputs,inputStates,layerStates,targets] = preparets(net,{},{},TargetSeries);
[net,tr] = train(net,inputs,targets,inputStates,layerStates);
weight = getwb(net);
inputweights=net.IW;
layerweights=net.LW;
biasvalues=net.b;
i can train and test my data and i took really great Mape
value and i wanna keep weights and use it later but i dont
know how to do that.i research every documentary.
net= setwb(net,weight);
I don't know how to use this function because it give me an matrix dimension error. Where is exactly wrong!?

Accepted Answer

Greg Heath
Greg Heath on 25 Feb 2016
You probably have to transpose weight. Type
whos weight
and reread the help and doc documentation to make sure the dimensions are correct.
help getwb
doc getwb
and similarly for setwb.
Hope this helps.
THank you for formally accepting my answer
Greg
Hope this helps

More Answers (0)

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!