A lightweight, transparent alternative to PyTorch/TensorFlow built on NumPy.
Project description
leanpass
A minimal, transparent NumPy-based autograd library for small models.
Features
Tensorwith reverse-mode autodiff- Operators:
+,-,*,/,**,@ - Activations:
relu,sigmoid,softmax LinearandMLPmodulesSGDandAdamoptimizers- Graph visualization via
Tensor.visualize_dot()
Install
pip install .
Quick start
from leanpass import Tensor, nn, optim
x = Tensor([[1.0, 2.0]], requires_grad=False)
model = nn.MLP([2, 16, 3])
logits = model(x)
Run demo
python demo.py
Publish to PyPI
- Update
versioninpyproject.toml. - Install build tools:
python -m pip install --upgrade build twine
- Build distribution files:
python -m build
- Upload to PyPI:
python -m twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
leanpass-0.1.0.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leanpass-0.1.0.tar.gz.
File metadata
- Download URL: leanpass-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7203741dbfaef300c361bfce3f186930fc108ee5b1b62c300ad65db6e192536
|
|
| MD5 |
f96b2824143aed5dff8f9e44d7d5856f
|
|
| BLAKE2b-256 |
6102ea569bbc988ad6cd330482b75ac53fa70610b5d7703ed592e11a90b22371
|
File details
Details for the file leanpass-0.1.0-py3-none-any.whl.
File metadata
- Download URL: leanpass-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c67e9dbb6a7b50c988138c5c87da51b9c501675e69ee71494fc71b900871148
|
|
| MD5 |
d49dc631eafd00c0029b12308edcfc4e
|
|
| BLAKE2b-256 |
de4abf87a37cd439a6231bf7d2b95b2778fa7eb9ccf4fc9ba1b77b8f69c157c8
|