Neural Network Toolbox |
Zero weight and bias initialization function
Syntax
Description
initzero(S,PR)
takes two arguments,
and returns an S
x R
weight matrix of zeros.
initzero
(S,[1 1])
returns S
x 1 bias vector of zeros.
Examples
Here initial weights and biases are calculated for a layer with two inputs ranging over [0 1] and [-2 2], and 4 neurons.
Network Use
You can create a standard network that uses initzero
to initialize its weights by calling newp
or newlin
.
To prepare the weights and the bias of layer i
of a custom network to be initialized with midpoint
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 'initzero
'. Set each net.layerWeights{i,j}.initFcn
to 'initzero
'. Set each net
.biases{i}.initFcn
to 'initzero
'.
To initialize the network, call init
.
See newp
or newlin
for initialization examples.
See Also
initwb | learncon |
© 1994-2005 The MathWorks, Inc.