I wanted to share an old project of mine called Deepflow, a deep learning framework I built in C++ about seven years ago. It’s a GPU-only framework based on CUDA and cuDNN, and it was designed to be fast and highly customizable for deep learning tasks, particularly GANs.
Backstory
Around the time TensorFlow was becoming popular, I was a C++ developer with no Python experience. I found Python frustrating, especially its indentation rules, and I kept running into errors that slowed me down. Despite this, I was deeply interested in GANs (Generative Adversarial Networks) and wanted to use them to augment training sets for liver CT/MR images I was working on.
Instead of forcing myself to use Python, I decided to build my own deep learning framework in C++. The result was Deepflow, a framework that turned out to be faster than TensorFlow at the time, particularly for GAN training. Most of my experiments were focused on face generation.
What Deepflow Does
Node-based architecture: Similar to TensorFlow, but written in C++. You can define models as computational graphs.
Multiple execution phases: You can run different parts of the graph at different times.
Custom solvers per variable: Tweak the training process by assigning custom solvers to each variable. C++ code generation: Generate C++ code from your Deepflow models for optimized execution.
GPU-only execution: The framework is designed to run exclusively on NVIDIA GPUs using CUDA and cuDNN.
Why I'm Sharing This
I eventually learned Python and moved on to using tools like TensorFlow, Keras and PyTorch, which had grown into powerful ecosystems with lots of community support. Deepflow got pushed aside, but it’s still a solid example of what goes into building a deep learning framework from scratch. I think it might be interesting for anyone who wants to dig into the low-level details of deep learning without the overhead of a large framework.
The code is available on GitHub, though it’s specifically tailored for NVIDIA GPUs. If you’re curious about how a custom deep learning framework can be built, feel free to take a look.
I hope it’s useful to someone out there.