// cum_deltas pointer. Then the contents
// is zeroed out.
int i, j, k;
float * temp;
// swap
temp = past_deltas;
past_deltas=cum_deltas;
cum_deltas=temp;
// zero cum_deltas matrix
// for new cycle
for (i=0; i< num_inputs; i++)
{
k=i*num_outputs;
for (j=0; j< num_outputs; j++)
cum_deltas[k+j]=0;
}
}
void network::update_momentum()
{
int i;
for (i=1; i
((output_layer *)layer_ptr[i])
−>update_momentum();
}
Previous Table of Contents Next
Copyright ©
IDG Books Worldwide, Inc.
C++ Neural Networks and Fuzzy Logic:Preface
Adding the Momentum Term
267