A simple neural network trained to recognize handwritten numbers
- MnistLoader
- DLL
- Is used in NeuralNetwork to load and parse training and test datasets
- NeuralNetwork
- Console application
- Is used to create a neural network on a training dataset
- Uses a test dataset to test the accuracy of the neural network
- TestingWithDrawing
- Windows form application
- Allows to load a previously created neural network
- Neural network can be tested with handwritten digits
The MNIST database of handwritten digits
Has training set of 60,000 examples, and test set of 10,000 examples. The digist have been size-normalized and centered in a fixed-size image (28 x 28 pixels)
- Initialize the weights of the neural network
- Feed the input data through the network and calculate the output
- Calculate the error between the predicted output and the actual output
- Propagate the error backwards through the network and calculate the gradients of the weights
- Adjust the weights using the gradients and a learning rate (a hyperparameter that determines how much the weights should be adjusted)
- Repeat steps 2-5 for a certain number of epochs(iterations over the entire dataset)
You can create a neural network to recognize handwritten numbers with your own parameters
- train images file path
- train labels file path
- test images file path
- test labels file path
- learning rate (from 0 to 1)
- epochs (int number)
- output dir path for storing neural networks (for each epoch)
- input layer size (must be 28*28 = 784)
- ...N. hidden layers sizes (must be ints)
- N+1. output layer size (must be 10)
.\NNBuilder\NeuralNetwork.exe
.\train-images.idx3-ubyte
.\train-labels.idx1-ubyte
.\t10k-images.idx3-ubyte
.\t10k-labels.idx1-ubyte
0.01
10
'./neural networks/764_256_64_10_lr0,01_e10'
784 256 64 10
The output file of the neural network can be loaded into TestingWithDrawing and you can check how the neural network works










