| Neural Network Toolbox | ![]() |
Syntax
Description
netprod is a net input function. Net input functions calculate a layer's net input by combining its weighted inputs and biases.
Zi - S x Q matrices.
and returns an element-wise sum of Zi's.
netprod('deriv') returns netprod's derivative function.
Examples
Here netprod combines two sets of weighted input vectors (which we have defined ourselves).
z1 = [1 2 4;3 4 1]; z2 = [-1 2 2; -5 -6 1]; n = netprod(Z1,Z2)
Here netprod combines the same weighted inputs with a bias vector. Because Z1 and Z2 each contain three concurrent vectors, three concurrent copies of B must be created with concur so that all sizes match up.
b = [0; -1]; n = netprod(z1,z2,concur(b,3))
Network Use
You can create a standard network that uses netprod by calling newpnn or newgrnn.
To change a network so that a layer uses netprod, set net.layers{i}.netInputFcn to 'netprod'.
In either case, call sim to simulate the network with netprod. See newpnn or newgrnn for simulation examples.
See Also
| negdist | netsum | ![]() |