wolffd@0: function net = convertoldnet(net) wolffd@0: %CONVERTOLDNET Convert pre-2.3 release MLP and MDN nets to new format wolffd@0: % wolffd@0: % Description wolffd@0: % NET = CONVERTOLDNET(NET) takes a network NET and, if appropriate, wolffd@0: % converts it from pre-2.3 to the current format. The difference is wolffd@0: % simply that in MLPs and the MLP sub-net of MDNs the field ACTFN has wolffd@0: % been renamed OUTFN to make it consistent with GLM and RBF networks. wolffd@0: % If the network is not old-format or an MLP or MDN it is left wolffd@0: % unchanged. wolffd@0: % wolffd@0: % See also wolffd@0: % MLP, MDN wolffd@0: % wolffd@0: wolffd@0: % Copyright (c) Ian T Nabney (1996-2001) wolffd@0: wolffd@0: switch net.type wolffd@0: case 'mlp' wolffd@0: if (isfield(net, 'actfn')) wolffd@0: net.outfn = net.actfn; wolffd@0: net = rmfield(net, 'actfn'); wolffd@0: end wolffd@0: case 'mdn' wolffd@0: net.mlp = convertoldnet(net.mlp); wolffd@0: end