Neural Network Tool Box
1 view (last 30 days)
Show older comments
I am working on a classification problem and the codes are written in m files. I am calling net=newff(....) within the m file.Once the network is trained, How to save the net? How to access the net weights?
0 Comments
Accepted Answer
Sean de Wolski
on 24 Oct 2012
What version are you using? We recommend using feedforwardnet.
If you run the example from the doc for feedforwardnet, you can access the net weights:
net.InputWeights
net.LayerWeights
And it can be saved to a *.mat file the same way you save any variable.
3 Comments
Greg Heath
on 25 Oct 2012
%What version are you using? We recommend using feedforwardnet.
PATTERNNET is more appropriate for classification
%If you run the example from the doc for feedforwardnet, you can access the net weights:
%net.InputWeights
%net.LayerWeights
No. The correct syntax is
IW = net.IW{:,:}
LW = net.LW{:,:}
b = net.b{:,:}
%And it can be saved to a *.mat file the same way you save any variable.
Correct.
Greg
Greg Heath
on 25 Oct 2012
Why did you put a previously asked question in this post as a comment?
See the other post for my answer.
More Answers (0)
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!