A from-scratch deep learning framework in modern C++ with Python bindings.
Built to understand deep learning frameworks from first principles - from computational graphs to gradient computation to optimization algorithms.
For some examples on Python interface, see tests/python.
- Computational Graph: Dynamic graph construction with automatic differentiation
- Core Components:
- Automatic differentiation (autograd)
- Backpropagation engine
- Neural network layers (in progress)
- Python Interface: Seamless integration via Boost.Python
- Clean Architecture: Modular design, ~4K LOC
- CI/CD: Automated testing with GTest and GitHub Actions
- C++17/20
- CMake build system
- Boost.Python for Python bindings
- Google Test (GTest) for unit testing
- GitHub Actions for CI/CD
🚧 Work in Progress - Implementing additional layers and optimizations
Roadmap:
- Python Binding Unit Tests
- Additional layer types (Conv2D, LSTM, etc.)
- Optimizers and training framework
- CUDA kernels for performance-critical operations
- AlexNet reference implementation
- Docker deployment example
mkdir build && cd build
cmake ..
make
ctestCompile with building tests enabled:
mkdir build && cd build
cmake -DBUILD_TESTS=On ..
make
ctest - Compiler capable of C++20 at least (we test with gcc 12.3.0)
- Boost Python
- Cmake > 3.24
- Python 3 (we test with 3.10, but it should work with any version)
- pytest for unit tests (we use 9.0.2)
The implementation of the Python wrapper does not work on MSVC6/7 in its current form. This is due to an issue that arises from Boost Python in combination with these compilers. Workarounds are proposed, but not implemented. More information here here.
MIT