Neural Network Toolbox
  Go to function:
    Search    Help Desk 
initzero    Examples   See Also

Zero weight/bias initialization function

Syntax

W = initzero(S,PR)

b = initzero(S,[1 1])

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:

   1.
Set net.initFcn to 'initlay'. (net.initParam will automatically become 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



[ Previous | Help Desk | Next ]