The Complete SPRLIB & ANNLIB

grad_net

- calculate the gradient of all parameters in a net (LOCAL)

SYNOPSIS

void grad_net (net, target)

ARGUMENTS

NET *net A pointer to a NET structure.
double *target A vector with target values.

RETURNS

On return, all gradients are store in the appropriate SystemData.d fields (see system_data).

FUNCTION

This function calculates the gradient of the MSE with respect to all the trainable parameters in a net. First, it calculates the error at the output layer. Then, the error is calculated for each unit by back-propagation, using the grad_unit function.

NOTE

This function is used by the function grad_net_mse. The code is an adaptation of the back-propagation function bp_adapt_net.

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998