Building a C++ Neural Network Library from Scratch (Because I Couldn't Stand Python)
Hey everyone,
I wanted to introduce GradientCore, my open-source machine learning library written from scratch in C++.
GradientCore is my attempt at building a lightweight ML framework with a focus on performance and understanding how things work under the hood. It currently includes:
- Tensor operations with efficient memory management
- Autograd (automatic differentiation)
- Basic optimizers
- Neural network module
The project started because I personally struggle to think clearly when coding in Python. I wanted something built in C++ that I could actually understand and extend.
It began as a learning project inspired by Magicalbat’s “Coding a Machine Learning Library in C from Scratch” YouTube series. After a few failed attempts (including one very messy AI-assisted branch), I restarted clean and built it step by step.
The library is still early stage — nowhere near PyTorch level — but it’s becoming usable. All testing so far has been on my local machine, so feedback and bug reports are very welcome.
Links :-
github - https://github.com/spandan11106/GradCore-Tensor
docs - https://spandan11106.github.io/GradCore-Tensor/
blog - https://spandan11106.github.io/GradCore-Tensor/blog
I’m looking for contributors who are interested in C++ and machine learning. Even small contributions (bug fixes, documentation improvements, examples, etc.) would be greatly appreciated.
Would love to hear your thoughts or suggestions!
Thanks!
https://redd.it/1tlq21k
@r_cpp
Post #25260
12