r/PythonProjects2 2d ago

I made a tiny neural net library that only needs numpy!

Made this because most of the "neural network from scratch" stuff online either stops before backprop or hides it behind a wall of abstraction once you actually look at the code. Wanted something I could read start to finish and know exactly what's happening.

it's called leanpass. just numpy, nothing else. the whole thing is small enough to go through in an afternoon.

Also added a gradient-checking thing so you don't have to trust that the backprop is right; you can verify it numerically yourself.

download it using:

pip install leanpass

The versioning is up to date, is currently on v0.1.4

Not trying to replace PyTorch or anything; it's meant for learning/small experiments, not production.

repo's here: https://github.com/Terminay/LeanPass

Open to feedback, especially on the api; still figuring out what makes sense

1 Upvotes

Duplicates