Neural Network Toolbox | ![]() ![]() |
Form bias and weights into single vector
Syntax
Description
This function takes weight matrices and bias vectors for a network and reshapes them into a single vector.
X =
formx(net,B,IW,LW)
takes these arguments,
net -
Neural network.
B -
Nlx1 cell array of bias vectors.
IW -
NlxNi cell array of input weight matrices.
LW -
NlxNl cell array of layer weight matrices.
X -
Vector of weight and bias values
Examples
Here we create a network with a two-element input, and one layer of three neurons.
We can get view its weight matrices and bias vectors as follows:
We can put these values into a single vector as follows:
See Also
![]() | errsurf | gensim | ![]() |