Neural Network Toolbox™ Previous page   Next Page 
initzero
 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,

  1. Set net.initFcn to 'initlay'. (net.initParam automatically becomes initlay's default parameters.)
  2. Set net.layers{i}.initFcn to 'initwb'.
  3. Set each 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, initlay, init


 Provide feedback about this page 

Previous page initwb learncon Next page

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