comparison toolboxes/FullBNT-1.0.7/netlab3.3/mdnunpak.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
1 function net = mdnunpak(net, w)
2 %MDNUNPAK Separates weights vector into weight and bias matrices.
3 %
4 % Description
5 % NET = MDNUNPAK(NET, W) takes an mdn network data structure NET and a
6 % weight vector W, and returns a network data structure identical to
7 % the input network, except that the weights in the MLP sub-structure
8 % are set to the corresponding elements of W.
9 %
10 % See also
11 % MDN, MDNPAK, MDNFWD, MDNERR, MDNGRAD
12 %
13
14 % Copyright (c) Ian T Nabney (1996-2001)
15 % David J Evans (1998)
16
17 errstring = consist(net, 'mdn');
18 if ~errstring
19 error(errstring);
20 end
21 if net.nwts ~= length(w)
22 error('Invalid weight vector length')
23 end
24
25 net.mlp = mlpunpak(net.mlp, w);