Daniel@0: function [h, varargout] = nethess_weighted(w, net, x, t, eso_w, varargin) Daniel@0: %NETHESS Evaluate network Hessian Daniel@0: % Daniel@0: % Description Daniel@0: % Daniel@0: % H = NETHESS(W, NET, X, T) takes a weight vector W and a network data Daniel@0: % structure NET, together with the matrix X of input vectors and the Daniel@0: % matrix T of target vectors, and returns the value of the Hessian Daniel@0: % evaluated at W. Daniel@0: % Daniel@0: % [E, VARARGOUT] = NETHESS(W, NET, X, T, VARARGIN) also returns any Daniel@0: % additional return values from the network Hessian function, and Daniel@0: % passes additional arguments to that function. Daniel@0: % Daniel@0: % See also Daniel@0: % NETERR, NETGRAD, NETOPT Daniel@0: % Daniel@0: Daniel@0: % Copyright (c) Ian T Nabney (1996-9) Daniel@0: Daniel@0: hess_str = [net.type, 'hess_weighted']; Daniel@0: Daniel@0: net = netunpak(net, w); Daniel@0: Daniel@0: [s{1:nargout}] = feval(hess_str, net, x, t, eso_w, varargin{:}); Daniel@0: h = s{1}; Daniel@0: for i = 2:nargout Daniel@0: varargout{i-1} = s{i}; Daniel@0: end