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

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
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);