Inspired by this blog post I decided to implement my own neural network from scratch in C.
I was motivated to better understand how neural networks operate. If you can write it in C, you can probably understand it!
My goal was to classify the MNIST dataset with decent accuracy.
My model consists of a single hidden layer, fully connected to both input and output layers. The hidden and output layers are activated with the sigmoid activation function and the output of the model is passed through the softmax function to compute the probability of each label.
I trained the model on 30,000 training samples. With that I was able to obtain an accuracy score of over 90%!
The source code can be found on my GitHub here.
A few samples from the MNIST dataset.
A screenshot showing the results of my training and testing.