netprod
Product net input function
Syntax
N = netprod({Z1,Z2,...,Zn})
info = netprod('code')
Description
netprod is a net input function. Net input functions calculate a layer’s
net input by combining its weighted inputs and biases.
N = netprod({Z1,Z2,...,Zn}) takes
Zi |
|
and returns an element-wise product of Z1 to
Zn.
info = netprod(' returns information
about this function. The following codes are supported: code')
'deriv' | Name of derivative function |
'fullderiv' | Full |
'name' | Full name |
'fpnames' | Returns names of function parameters |
'fpdefaults' | Returns default function parameters |
Examples
Here netprod combines two sets of weighted input vectors
(user-defined).
Z1 = [1 2 4;3 4 1];
Z2 = [-1 2 2; -5 -6 1];
Z = {Z1,Z2};
N = netprod({Z})
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.
B = [0; -1];
Z = {Z1, Z2, concur(B,3)};
N = netprod(Z)
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.
Version History
Introduced before R2006a