Neural Network Toolbox™ Previous page   Next Page 
normprod
 Provide feedback about this page

Normalized dot product weight function

Syntax

Description

normprod is a weight function. Weight functions apply weights to an input to get weighted inputs.

normprod(W,P,FP) takes these inputs,

W
S x R weight matrix
P
R x Q matrix of Q input (column) vectors
FP
Row cell array of function parameters (optional, ignored)

and returns the S x Q matrix of normalized dot products.

normprod(code) returns information about this function. The following codes are defined:

'deriv'
Name of derivative function
'pfullderiv'
Full input derivative = 1, linear input derivative = 0
'wfullderiv'
Full weight derivative = 1, linear weight derivative = 0
'name'
Full name
'fpnames'
Returns names of function parameters
'fpdefaults'
Returns default function parameters

normprod('size',S,R,FP) takes the layer dimension S, input dimension R, and function parameters, and returns the weight size [S x R].

normprod('dp',W,P,Z,FP) returns the derivative of Z with respect to P.

normprod('size',S,R,FP) returns the derivative of Z with respect to W.

Examples

Here you define a random weight matrix W and input vector P and calculate the corresponding weighted input Z.

Network Use

You can create a standard network that uses normprod by calling newgrnn.

To change a network so an input weight uses normprod, set net.inputWeight{i,j}.weightFcn to 'normprod'. For a layer weight, set net.layerWeight{i,j}.weightFcn to 'normprod'.

In either case, call sim to simulate the network with normprod. See newgrnn for simulation examples.

Algorithm

normprod returns the dot product normalized by the sum of the input vector elements.

See Also

dotprod


 Provide feedback about this page 

Previous page normc normr Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS