Neural Network Toolbox Previous page   Next Page
midpoint

Midpoint weight initialization function

Syntax

Description

midpoint is a weight initialization function that sets weight (row) vectors to the center of the input ranges.

midpoint(S,PR) takes two arguments,

and returns an S x R matrix with rows set to (Pmin+Pmax)'/2.

Examples

Here initial weight values are calculated for a 5 neuron layer with input elements ranging over [0 1] and [-2 2].

Network Use

You can create a standard network that uses midpoint to initialize weights by calling newc.

To prepare the weights and the bias of layer i of a custom network to initialize 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 'midpoint'. Set each net.layerWeights{i,j}.initFcn to 'midpoint';

To initialize the network call init.

See Also


Previous page  maxlinlr minmax Next page

© 1994-2005 The MathWorks, Inc.