Dot product weight function
Syntax
Z = dotprod(W,P)
df = dotprod('deriv')
Description
dotprod is the dot product weight function. Weight functions apply weights to an input to get weighted inputs.
dotprod(W,P) takes these inputs,
and returns the S x Q dot product of W and P.
Examples
Here we define a random weight matrix W and input vector P and calculate the corresponding weighted input Z.
W = rand(4,3);
P = rand(3,1);
Z = dotprod(W,P)
Network Use
You can create a standard network that uses dotprod by calling newp or newlin.
To change a network so an input weight uses dotprod, set net.inputWeight{i,j}.weightFcn to 'dotprod'. For a layer weight, set net.inputWeight{i,j}.weightFcn to 'dotprod'.
In either case, call sim to simulate the network with dotprod.
See newp and newlin for simulation examples.
See Also
sim, ddotprod, dist, negdist, normprod
[ Previous | Help Desk | Next ]