Simple fully connected neural network implementation in modern C++
Modular and easily upgradable. Well suited for experimenting and learning for neural networks or C++ newcomers. This project was developed while reading the book Neural Networks and Deep Learning by Michael Nielsen.
- Activation functions
- Logistic
- Softmax (unfinished)
- Cost functions
- Quadratic
- Cross Entropy
- Optimizers
- Stochastic Gradient Descent
- Header only
- Linear algebra using Eigen library
- CSV parsing using csv2 library
- C++17 and above
- CMake & VSCode are recommended
Input data set is provided as a 7-Zip file which needs to be manually extracted, to reveal the CSV files. The data is based on MNIST database and split to training, validation and testing files. An additional smaller sub-set is provided for debugging purposes (faster).
A network with 30 hidden neurons (784-30-10) completes the training session (30 epochs) with move than 96% accuracy on validation data and testing data. Running in Release mode (optimized for speed) is recommended.
The project is available under the MIT license.