MATLAB: Neural Network Tool Box

Deep Learning Toolboxneural networks

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?

Best Answer

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.