Weight and Bias from a Neural Network
54 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
massimiliano de martino
le 6 Avr 2018
Commenté : KAE
le 9 Oct 2018
Hello to everybody, I'm using Neural Network to solve a problem which can be composed by a different number of input and output, particularly Neural Network used is a 4 Layer NN so composed (First Layer 20 Neurons - Second Layer 15 Neurons -Third Layer 10 Neurons - Fourth Layer 5 Neurons ).I need to know Neural Network weight. Here it's the problem, when i have a small number of input and output,i use the _getwb_ command which allows me to calculate NN weight and bias. Otherwise when input and output number grows up getwb command give me as result this message: '0×1 empty double column vector'. How can i get weight when numeber of input and output (and so number of weight) grows up ?? I apologize for my English which is not perfect.
0 commentaires
Réponse acceptée
Brendan Hamm
le 6 Avr 2018
I'm not sure why you would get a 0x1 empty double column vector. You may need to post some code to help figure this piece out.
You can also try simply indexing the weights from the network:
IW = net.IW; % Cell containing the Input Weights
b1 = net.b; % Cell containing the biases
LW = net.LW; % Cell containing the layer weights
Note, many elements of the cell will likely be empty (excepting the bias weights), but you will have matrices of the weights in the non-empty cells.
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!