Main Content

separatewb

Separate biases and weight values from weight/bias vector

Syntax

[b,IW,LW] = separatewb(net,wb)

Description

[b,IW,LW] = separatewb(net,wb) takes two arguments,

net

Neural network

wb

Weight/bias vector

and returns

b

Cell array of bias vectors

IW

Cell array of input weight matrices

LW

Cell array of layer weight matrices

Examples

Here a feedforward network is trained to fit some data, then its bias and weight values formed into a vector. The single vector is then redivided into the original biases and weights.

[x,t] = simplefit_dataset;
net = feedforwardnet(20);
net = train(net,x,t);
wb = formwb(net,net.b,net.iw,net.lw)
[b,iw,lw] = separatewb(net,wb)

Version History

Introduced in R2010b

See Also

| |