Main Content


Product net input function


N = netprod({Z1,Z2,...,Zn})
info = netprod('code')


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


S-by-Q matrices in a row cell array

and returns an element-wise product of Z1 to Zn.

info = netprod('code') returns information about this function. The following codes are supported:


Name of derivative function


Full N-by-S-by-Q derivative = 1, element-wise S-by-Q derivative = 0


Full name


Returns names of function parameters


Returns default function parameters


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

See Also

| |