comparison toolboxes/FullBNT-1.0.7/netlab3.3/netgrad.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function g = netgrad(w, net, x, t)
2 %NETGRAD Evaluate network error gradient for generic optimizers
3 %
4 % Description
5 %
6 % G = NETGRAD(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 gradient of the error
9 % function evaluated at W.
10 %
11 % See also
12 % MLP, NETERR, NETOPT
13 %
14
15 % Copyright (c) Ian T Nabney (1996-2001)
16
17 gradstr = [net.type, 'grad'];
18
19 net = netunpak(net, w);
20
21 g = feval(gradstr, net, x, t);