The code is situated in ~rth/public/bpnn. There are two files: backprop.cc and its header file backprop.h. Copy the files to your own area, and use them there. You may make any changes you wish. The description below, however, does work with the code unchanged.
The code defines bpnn which is a class that encapsulates a neural network that has any number of input and output units and one hidden layer with any number of units. It uses feedforward for execeution and back propagation for learning. A sketch of the public interface is here:
Since the run and train functions are single pass functions, you must write your own code to call them in a loop. The general method to train a network is as follows:
The network has then been trained. You may then use a similar setup to test the network, calling run instead of train.
How many epochs to use for training is a tricky issue. You should certainly keep track of the errors returned by train (in reference parameters three and four),and clearly the lower the error, the better. However, if your network structure is wrong, then learning will not take place, and a loop with a test for a zero or close-to-zero error will never exit. You should therefore put an upper limit on the number of epochs, or even use a timed loop after you have got a feel for how fast the program is looping during training.