Neural Network Toolbox |
Symmetric random weight/bias initialization function
Syntax
Description
rands is a weight/bias initialization function.
S
-- Number of neurons
and returns an S
-by-R
weight matrix of random values between -1 and 1.
rands(S,R)
returns an S
-by-R
matrix of random values. rands(S)
returns an S
-by-1 vector of random values.
Examples
Here three sets of random values are generated with rands.
Network Use
To prepare the weights and the bias of layer i
of a custom network to be initialized with rands
net.initFcn
to 'initlay
'. (net.initParam
will automatically become initlay's default parameters.)
net.layers{i}.initFcn
to 'initwb
'.
net.inputWeights{i,j}.initFcn
to 'rands'. Set each net.layerWeights{i,j}.initFcn
to 'rands'. Set each net.biases{i}.initFcn
to 'rands
'.
To initialize the network call init.
See Also
randnr | randtop |
© 1994-2005 The MathWorks, Inc.