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