Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

initzero

Zero weight and bias initialization function

Syntax

W = initzero(S,PR)
b = initzero(S,[1 1])

Description

W = initzero(S,PR) takes two arguments,

S

Number of rows (neurons)

PR

R-by-2 matrix of input value ranges = [Pmin Pmax]

and returns an S-by-R weight matrix of zeros.

b = initzero(S,[1 1]) returns an S-by-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.

W = initzero(5,[0 1; -2 2])
b = initzero(5,[1 1])

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'.

  4. Set each net.layerWeights{i,j}.initFcn to 'initzero'.

  5. Set each net.biases{i}.initFcn to 'initzero'.

To initialize the network, call init.

See help newp and help newlin for initialization examples.

See Also

| |

Introduced before R2006a

Was this topic helpful?