initwb
By weight and bias layer initialization function
Syntax
initwb(net,i)
Description
initwb is a layer initialization function that initializes a layer’s
weights and biases according to their own initialization functions.
initwb(net,i) takes two arguments,
net | Neural network |
i | Index of a layer |
and returns the network with layer i’s weights and biases
updated.
Network Use
You can create a standard network that uses initwb by calling
perceptron or linearlayer.
To prepare a custom network to be initialized with initwb,
Set
net.initFcnto'initlay'. This setsnet.initParamto the empty matrix[], becauseinitlayhas no initialization parameters.Set
net.layers{i}.initFcnto'initwb'.Set each
net.inputWeights{i,j}.initFcnto a weight initialization function. Set eachnet.layerWeights{i,j}.initFcnto a weight initialization function. Set eachnet.biases{i}.initFcnto a bias initialization function. Examples of initialization functions arerands(for weights and biases) andmidpoint(for weights only).
To initialize the network, call init.
Algorithms
Each weight (bias) in layer i is set to new values calculated according
to its weight (bias) initialization function.
Version History
Introduced before R2006a
See Also
init | initlay | initnw | linearlayer | perceptron