This project demonstrates using an artificial neural network to recoginize handwritten digits. The method of network training used is backpropagation with momentum, and the node activation function used is the sigmoid function. The network is made up of three layers: the input layer, a hidden layer, and the output layer. The input layer consists of 256 input nodes, 1 for each pixel. The hidden layer consists of the number of input layer nodes minus 1. The output layer consists of 10 output nodes, one for each recognizable digit (0-9). Training and testing data come from the MNIST database of handwritten digits.
The training set consists of 60,000 examples, and the testing set consists of another 10,000 examples. Each training epoch applies all 60,000 training examples. The images are grayscale format, and a threshold is applied to each image so that pixels that make up the digit have an input value of 1.0 and the remaining background pixels have an input value of 0.0. This threshold is adjusted each training epoch through a range of values so that the network is trained with digits of varying 'thickness'. Additionally, 6,000 blank input/output training examples are interspersed among the MNIST examples during training in order to maintain that empty desired output when an empty or mostly empty input is applied to the network. This is primarily an aid for the accuracy of the mouse drawn input testing provided by the GUI.