How to Show the Weight or Bias in a Neural Network?
Show older comments
How to show the weight/bias from every layer in my neural network? I am doing a feedforward neural network with 2 hidden layers. Furthermore, how to determine how many hidden layers should I use in a neural network? Currently I have 3 inputs and 1 output. When I want to increase the hidden layer to 3, an error occurred saying that I have not sufficient of input for 3 hidden layers.
1 Comment
Shani
on 19 Nov 2013
I am trying to create a neural network, would you have any notes that I can use to aid me with that at all? please
Accepted Answer
More Answers (2)
Manu R
on 6 Mar 2011
Edited: John Kelly
on 19 Nov 2013
Neural net objects in MATLAB have fields you can access to determine layer weights and biases.
Suppose:
mynet = feedforwardnet % Just a toy example, without any training
weights = mynet.LW
biases = mynet.b
% weight and bias values:
%
% IW: {2x1 cell} containing 1 input weight matrix
% LW: {2x2 cell} containing 1 layer weight matrix
% b: {2x1 cell} containing 2 bias vectors
2 Comments
Kai Hao Then
on 27 Mar 2011
Rahul
on 18 Apr 2013
Display "weights" in this example and it will show numbers.
Rahul
on 18 Apr 2013
2 votes
or open "weights" in the Workspace.
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!