Azzera filtri
Azzera filtri

How to get the weight after training a SeriesNetwork?

6 visualizzazioni (ultimi 30 giorni)
Hello,
I tried to get the weight of my network after training it. So I called getwb(net), but I just got the following error: No appropriate method, property, or field 'numLayers' for class 'SeriesNetwork'. With layers(2).Weights I just got the Weights I started with. Has anybody an idea what I did wrong or what I can do to get the trained weights?
Thanks a lot!

Risposta accettata

Mukul Rao
Mukul Rao il 5 Dic 2017
Hello, I work for the MathWorks technical support team. The "getwb" function is only supported by legacy neural network objects. The "SeriesNetwork" object, which is relatively new does not have a documented method for obtaining weights and biases. There is an existing enhancement request in place.
It is possible however, to print the weights and biases associated for each layer.
For example,
net = alexnet
net.Layers(2).Weights %Weights of Convolution layer
net.Layers(2).Bias %Biases of Convolution layer

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by