Neural Network Toolbox Previous page   Next Page

Layer Weights

delays

This property defines a tapped delay line between the jth layer and its weight to the ith layer.

It must be set to a row vector of increasing 0 or positive integer values.

initFcn

This property defines the function used to initialize the weight matrix going to the ith layer from the jth layer, if the network initialization function is initlay, and the ith layer's initialization function is initwb.

This function can be set to the name of any weight initialization function, including the toolbox functions.

Weight and Bias Initialization Functions
initzero
Zero-weight/bias initialization function.
midpoint
Midpoint-weight initialization function.
randnc
Normalized column-weight initialization function.
randnr
Normalized row-weight initialization function.
rands
Symmetric random-weight/bias initialization function.

This function is used to calculate an initial weight matrix for the weight going to the ith layer from the jth layer (net.LW{i,j}) when init is called, if the network initialization function (net.initFcn) is initlay, and the ith layer's initialization function (net.layers{i}.initFcn) is initwb.

Custom Functions..   See Advanced Topics for information on creating custom initialization functions.

learn

This property defines whether the weight matrix to the ith layer from the jth layer is to be altered during training and adaption.

It can be set to 0 or 1.

It enables or disables the weights learning during calls to either adapt or train.

learnFcn

This property defines the function used to update the weight matrix going to the ith layer from the jth layer during training, if the network training function is trainb, trainc, or trainr, or during adaption, if the network adapt function is trains.

It can be set to the name of any weight learning function, including these toolbox functions.

Learning Functions
learngd
Gradient-descent weight/bias learning function.
learngdm
Grad. descent w/momentum weight/bias learning function.
learnh
Hebb-weight learning function.
learnhd
Hebb with decay weight learning function.
learnis
Instar-weight learning function.
learnk
Kohonen-weight learning function.
learnlv1
LVQ1-weight learning function.
learnlv2
LVQ2-weight learning function.
learnos
Outstar-weight learning function.
learnp
Perceptron-weight/bias learning function.
learnpn
Normalized perceptron-weight/bias learning function.
learnsom
Self-organizing map-weight learning function.
learnwh
Widrow-Hoff weight/bias learning rule.

The learning function updates the weight matrix of the ith layer form the jth layer (net.LW{i,j}) during calls to train, if the network training function (net.trainFcn) is trainb, trainc, or trainr, or during calls to adapt, if the network adapt function (net.adaptFcn) is trains.

Custom Functions..   See Advanced Topics for information on creating custom learning functions.

learnParam

This property defines the learning parameters fields and values for the current learning function of the ith layer's weight coming from the jth layer.

The subfields of this property depend on the current learning function (net.layerWeights{i,j}.learnFcn). Evaluate the above reference to see the fields of the current learning function.

Get help on the current learning function to get a description of what each field means.

size (read-only)

This property defines the dimensions of the ith layer's weight matrix from the jth layer.

It is always set to a two-element row vector indicating the number of rows and columns of the associated weight matrix (net.LW{i,j}). The first element is equal to the size of the ith layer (net.layers{i}.size). The second element is equal to the product of the length of the weights delay vectors with the size of the jth layer.

userdata

This property provides a place for users to add custom information to the (i,j)th layer weight.

Only one field is predefined. It contains a secret message to all Neural Network Toolbox users.

weightFcn

This property defines the function used to apply the ith layer's weight from the jth layer to that layer's output.

It can be set to the name of any weight function, including these toolbox functions.

Weight Functions
dist
Euclidean-distance weight function.
dotprod
Dot-product weight function.
mandist
Manhattan-distance weight function.
negdist
Dot-product weight function.
normprod
Normalized dot-product weight function.

The weight function is used when sim is called to simulate the network.

Custom Functions..   See Advanced Topics for information on creating custom weight functions.


Previous page  Input Weights Reference Next page

© 1994-2005 The MathWorks, Inc.