Skip to content

RobBa/dl_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Learning Library

A from-scratch deep learning framework in modern C++ with Python bindings.

Motivation

Built to understand deep learning frameworks from first principles - from computational graphs to gradient computation to optimization algorithms.

Running examples

For some examples on Python interface, see tests/python.

Features

  • 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

Tech Stack

  • C++17/20
  • CMake build system
  • Boost.Python for Python bindings
  • Google Test (GTest) for unit testing
  • GitHub Actions for CI/CD

Current Status

🚧 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

Building

mkdir build && cd build
cmake ..
make
ctest

Running Unit Tests

Compile with building tests enabled:

mkdir build && cd build
cmake -DBUILD_TESTS=On ..
make
ctest 

Required

  • 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)

Troubleshooting

Building on Windows

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.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published