Mercurial > hg > camir-ismir2012
comparison toolboxes/FullBNT-1.0.7/netlab3.3/nethess.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
| author | Daniel Wolff |
|---|---|
| date | Fri, 19 Aug 2016 13:07:06 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:cc4b1211e677 |
|---|---|
| 1 function [h, varargout] = nethess(w, net, x, t, varargin) | |
| 2 %NETHESS Evaluate network Hessian | |
| 3 % | |
| 4 % Description | |
| 5 % | |
| 6 % H = NETHESS(W, NET, X, T) takes a weight vector W and a network data | |
| 7 % structure NET, together with the matrix X of input vectors and the | |
| 8 % matrix T of target vectors, and returns the value of the Hessian | |
| 9 % evaluated at W. | |
| 10 % | |
| 11 % [E, VARARGOUT] = NETHESS(W, NET, X, T, VARARGIN) also returns any | |
| 12 % additional return values from the network Hessian function, and | |
| 13 % passes additional arguments to that function. | |
| 14 % | |
| 15 % See also | |
| 16 % NETERR, NETGRAD, NETOPT | |
| 17 % | |
| 18 | |
| 19 % Copyright (c) Ian T Nabney (1996-2001) | |
| 20 | |
| 21 hess_str = [net.type, 'hess']; | |
| 22 | |
| 23 net = netunpak(net, w); | |
| 24 | |
| 25 [s{1:nargout}] = feval(hess_str, net, x, t, varargin{:}); | |
| 26 h = s{1}; | |
| 27 for i = 2:nargout | |
| 28 varargout{i-1} = s{i}; | |
| 29 end |
