| Neural Network Toolbox | ![]() |
Sum net input derivative function
Syntax
Description
dnetsum is the net input derivative function for netsum.
Z - S x Q weighted input.
N - S x Q net input.
and returns the S x Q derivative dN/dZ.
Examples
Here we define two weighted inputs for a layer with three neurons.
Z1 = [0; 1; -1]; Z2 = [1; 0.5; 1.2];
We calculate the layer's net input N with netsum and then the derivative of N with respect to each weighted input.
N = netsum(Z1,Z2) dN_dZ1 = dnetsum(Z1,N) dN_dZ2 = dnetsum(Z2,N)
Algorithm
The derivative of a sum with respect to any element of that sum is always a ones matrix that is the same size as the sum.
See Also
| dnetprod | dotprod | ![]() |