Neural Network Toolbox Previous page   Next Page
netsum

Sum net input function

Syntax

N = netsum(Z1,Z2,...,Zn)

df = netsum('deriv')

Description

netsum is a net input function. Net input functions calculate a layer's net input by combining its weighted inputs and biases.

netsum(Z1,Z2,...,Zn) takes any number of inputs,

and returns N, the element-wise sum of Zi's.

netsum('deriv') returns netsum's derivative function.

Examples

Here netsum combines two sets of weighted input vectors (which we have defined ourselves).

Here netsum 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.

Network Use

You can create a standard network that uses netsum by calling newp or newlin.

To change a network so a layer uses netsum, set net.layers{i}.netInputFcn to 'netsum'.

In either case, call sim to simulate the network with netsum. See newp or newlin for simulation examples.

See Also

sim, dnetprod, netprod, concur


Previous page  netprod network Next page

© 1994-2005 The MathWorks, Inc.