ann_FF_ConjugGrad — Conjugate Gradient algorithm.
W The weight hypermatrix; it have to be initialized with ann_BP_init function.
x Matrix of input patterns, one pattern per column.
t Matrix of target patterns, one pattern per column.
N Row vector describing the number of neurons per layer.
N(1) is the size of input pattern vector, N(size(N,'c')) is the size of output pattern vector (and also target).
T Number of training cycles (epochs, discrete time, steps).
dW The quantity used to calculate the product between a direction and the Hessian trough a finite differences algorithm; this parameter is passed to ann_BP_VHess function (see its man page for details). ex string representing a valid Scilab sequence. It is executed after the weight hypermatrix have been updated (i.e. after each epoch), using "execstr". This parameter is optional, default value: " " (empty string, i.e. does nothing). af The name of activation function to be used (string). This parameter is optional, default value "ann_log_activ", i.e. the logistic activation function. err_deriv_y The name of error function derivative with respect to network outputs (string). This parameter is optional, default value is "ann_d_sum_of_sqr", i.e. the derivative of sum-of-squares.
This function performs training of a feedforward net using the conjugate gradients algorithm.
The computation of Hessian is avoided by calculating directly the product between a direction and Hessian trough a finite difference approach which require just two error gradients (see function ann_BP_VHess).
The error gradient is calculated across all training patterns at once given in x (respectively t).