Jacobian matrix of neural network

Rita (view profile)

on 25 Feb 2016
Latest activity Answered by Monsij Biswal

Monsij Biswal (view profile)

on 19 Jun 2019
Accepted Answer by Cam Salzberger

Cam Salzberger (view profile)

what is inside of jacobian matrix ?I know that for a trained network with number of data :1,2,..., n is equall to the number of column in Jacobian matrix . what is rows?

Tags

Answer by Cam Salzberger

Cam Salzberger (view profile)

on 29 Feb 2016

Hello Rita,
The number of rows in the Jacobian output by "defaultderiv" is the sum of the number of weights and biases for the network. For example, if you do this to create the network:
[x,t] = simplefit_dataset;
net = feedforwardnet(10);
net = train(net,x,t);
y = net(x);
perf = perform(net,t,y);
dwb = defaultderiv('de_dwb',net,x,t);
Now "dwb" is the Jacobian of errors with respect to the net's weights and biases. It is a 31x94 matrix. If you check out the following properties in the network:
net.IW % Input weight matrices
net.LW % Layer weight matrices
net.b % Bias vectors
you can see that "net.IW" contains a 10x1 matrix, "net.LW" contains a 1x10 matrix, and "net.b" contains a 10-element vector and a 1-element vector. The number of elements adds up to 31.
I hope this helps clarify the Jacobian.
-Cam

Answer by Greg Heath

Greg Heath (view profile)

on 27 Feb 2016

The number of input variables
Hope this helps.
Thank you for formally accepting my answer
Greg

Rita

Rita (view profile)

on 29 Feb 2016
Thanks Greg.I used this function and the number of columns are more than the number of inputs.
b=defaultderiv('de_dwb',y.net,y.inputs,y.targets);