•
void list_errors() Lists errors for all layers while a simulation is in progress.
•
void forward_prop() Performs the forward propagation.
•
void backward_prop(float &) Performs the backward error propagation.
•
int fill_IObuffer(FILE *) This routine fills the internal IO buffer with data from the training or
test data sets.
•
void set_up_pattern(int) This routine is used to set up one pattern from the IO buffer for
training.
•
inline float squash(float input) This function performs the sigmoid function.
•
inline float randomweight (unsigned unit) This routine returns a random weight between –1 and
1; use 1 to initialize the generator, and 0 for all subsequent calls.
Note that the functions squash(float) and randomweight(unsigned) are declared inline. This
means that the function's source code is inserted wherever it appears. This increases code size,
but also increases speed because a function call, which is expensive, is avoided.
The final file to look at is the backprop.cpp file presented in Listing 7.3.
Do'stlaringiz bilan baham: |