Main Content

initlay

Layer-by-layer network initialization function

Syntax

net = initlay(net)
info = initlay('code')

Description

initlayis a network initialization function that initializes each layeriaccording to its own initialization functionnet.layers{i}.initFcn.

net = initlay(net)takes

net

Neural network

and returns the network with each layer updated.

info = initlay('code')returns useful information for each supportedcodecharacter vector:

'pnames'

Names of initialization parameters

'pdefaults'

Default initialization parameters

initlaydoes not have any initialization parameters.

Network Use

You can create a standard network that usesinitlayby callingfeedforwardnet,cascadeforwardnet, and many other network functions.

To prepare a custom network to be initialized withinitlay,

  1. Setnet.initFcnto'initlay'. This setsnet.initParamto the empty matrix[], becauseinitlayhas no initialization parameters.

  2. Set eachnet.layers{i}.initFcnto a layer initialization function. (Examples of such functions areinitwbandinitnw.)

To initialize the network, callinit.

Algorithms

The weights and biases of each layeriare initialized according tonet.layers{i}.initFcn.

Version History

Introduced before R2006a