
Show HN: A machine learning library built from scratch using only the C++ stdlib - 16yoMLDev
https://github.com/bkkaggle/L2
======
16yoMLDev
Hi, I made this over the summer as a way to learn more about C++ and lower-
level machine learning concepts. I wanted to see how much I could build
myself, without relying on other libraries to handle things like creating
multidimensional arrays. The library contains a multidimensional array class,
Tensor, with support for strided arrays, numpy-style array slicing,
broadcasting, and most major math operations (including matrix
multiplication!). On top of this, the Parameter, Layer, Sequential, Loss,
Optimizer, and Trainer classes allow for running high-level machine learning
experiments without worrying about the low-level implementations.

Version 1 of this library focuses only supports a cpu backend at the moment
since I'm not familiar enough with c++ to start working with CUDA and cudnn.
It also primarily uses pass-by-value to reduce complexity at the result of
reduced efficiency. Version 2 of the library will focus on making the Tensor
class more efficient. Currently, only the Linear and Sigmoid layers, the MSE
loss, and the SGD optimizer have been implemented, but I will add more layers
and modules in V2.

Take a look at it on GitHub:

[https://github.com/bkkaggle/L2/](https://github.com/bkkaggle/L2/)

Or on Product Hunt:
[https://producthunt.com/posts/l2](https://producthunt.com/posts/l2)

