annotate toolboxes/FullBNT-1.0.7/netlab3.3/convertoldnet.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function net = convertoldnet(net)
wolffd@0 2 %CONVERTOLDNET Convert pre-2.3 release MLP and MDN nets to new format
wolffd@0 3 %
wolffd@0 4 % Description
wolffd@0 5 % NET = CONVERTOLDNET(NET) takes a network NET and, if appropriate,
wolffd@0 6 % converts it from pre-2.3 to the current format. The difference is
wolffd@0 7 % simply that in MLPs and the MLP sub-net of MDNs the field ACTFN has
wolffd@0 8 % been renamed OUTFN to make it consistent with GLM and RBF networks.
wolffd@0 9 % If the network is not old-format or an MLP or MDN it is left
wolffd@0 10 % unchanged.
wolffd@0 11 %
wolffd@0 12 % See also
wolffd@0 13 % MLP, MDN
wolffd@0 14 %
wolffd@0 15
wolffd@0 16 % Copyright (c) Ian T Nabney (1996-2001)
wolffd@0 17
wolffd@0 18 switch net.type
wolffd@0 19 case 'mlp'
wolffd@0 20 if (isfield(net, 'actfn'))
wolffd@0 21 net.outfn = net.actfn;
wolffd@0 22 net = rmfield(net, 'actfn');
wolffd@0 23 end
wolffd@0 24 case 'mdn'
wolffd@0 25 net.mlp = convertoldnet(net.mlp);
wolffd@0 26 end