Mercurial > hg > camir-ismir2012
annotate toolboxes/FullBNT-1.0.7/netlab3.3/convertoldnet.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 |
rev | line source |
---|---|
Daniel@0 | 1 function net = convertoldnet(net) |
Daniel@0 | 2 %CONVERTOLDNET Convert pre-2.3 release MLP and MDN nets to new format |
Daniel@0 | 3 % |
Daniel@0 | 4 % Description |
Daniel@0 | 5 % NET = CONVERTOLDNET(NET) takes a network NET and, if appropriate, |
Daniel@0 | 6 % converts it from pre-2.3 to the current format. The difference is |
Daniel@0 | 7 % simply that in MLPs and the MLP sub-net of MDNs the field ACTFN has |
Daniel@0 | 8 % been renamed OUTFN to make it consistent with GLM and RBF networks. |
Daniel@0 | 9 % If the network is not old-format or an MLP or MDN it is left |
Daniel@0 | 10 % unchanged. |
Daniel@0 | 11 % |
Daniel@0 | 12 % See also |
Daniel@0 | 13 % MLP, MDN |
Daniel@0 | 14 % |
Daniel@0 | 15 |
Daniel@0 | 16 % Copyright (c) Ian T Nabney (1996-2001) |
Daniel@0 | 17 |
Daniel@0 | 18 switch net.type |
Daniel@0 | 19 case 'mlp' |
Daniel@0 | 20 if (isfield(net, 'actfn')) |
Daniel@0 | 21 net.outfn = net.actfn; |
Daniel@0 | 22 net = rmfield(net, 'actfn'); |
Daniel@0 | 23 end |
Daniel@0 | 24 case 'mdn' |
Daniel@0 | 25 net.mlp = convertoldnet(net.mlp); |
Daniel@0 | 26 end |