Daniel@0: function [net, error] = mlptrain(net, x, t, its); Daniel@0: %MLPTRAIN Utility to train an MLP network for demtrain Daniel@0: % Daniel@0: % Description Daniel@0: % Daniel@0: % [NET, ERROR] = MLPTRAIN(NET, X, T, ITS) trains a network data Daniel@0: % structure NET using the scaled conjugate gradient algorithm for ITS Daniel@0: % cycles with input data X, target data T. Daniel@0: % Daniel@0: % See also Daniel@0: % DEMTRAIN, SCG, NETOPT Daniel@0: % Daniel@0: Daniel@0: % Copyright (c) Ian T Nabney (1996-2001) Daniel@0: Daniel@0: options = zeros(1,18); Daniel@0: options(1) = -1; % To prevent any messages at all Daniel@0: options(9) = 0; Daniel@0: options(14) = its; Daniel@0: Daniel@0: [net, options] = netopt(net, options, x, t, 'scg'); Daniel@0: Daniel@0: error = options(8); Daniel@0: