| Neural Network Toolbox | |
| Provide feedback about this page |
Zero weight and bias initialization function
Syntax
Description
initzero(S,PR) takes two arguments,
S |
Number of rows (neurons) |
PR |
R x 2 matrix of input value ranges = [Pmin Pmax] |
and returns an S x R weight matrix of zeros.
initzero(S,[1 1]) returns an 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 four 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 automatically becomes 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
| Provide feedback about this page |
![]() | initwb | learncon | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |