This project provides a simple neural network implementation in C++, complete with:
- Matrix operations (multiply, add, transpose) using parallel STL transforms
- Activation functions (Sigmoid, ReLU, Tanh)
- Loss functions (MSE, Cross-Entropy)
- Optimizers (SGD, Momentum)
- NeuralNetwork class that ties everything together
It also includes basic test files to verify functionalities.
- Matrix (row-major) class with parallel operations using
std::execution::par
- Activation library providing Sigmoid, ReLU, Tanh
- Loss library supporting MSE and CrossEntropy
- Optimizers like SGD and Momentum
- Feed-Forward Neural Network:
- Multi-layer
- Forward pass, backprop, momentum-based weight updates
You can compile it with C++17, on Windows. A Visual Studio solution file is provided.
I was bored, and decided to learn how neural networks worked. This was a culmination of quite some time of knowledge.