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