A lightweight PyTorch-inspired autograd library built from scratch
Project description
# SimpleGrade
[](https://pypi.org/project/simplegrade/)
[](https://pypi.org/project/simplegrade/)
[](https://github.com/mohamedrxo/simplegrad)
[](LICENSE)
SimpleGrade is a lightweight Python library inspired by PyTorch and Tinygrad. It provides automatic differentiation and the core components required to build and train neural networks from scratch, making it an educational framework for understanding how deep learning libraries work internally.
## Installation
Install the latest release from PyPI:
```bash
pip install simplegrade
```
Or install the latest development version from GitHub:
```bash
git clone https://github.com/mohamedrxo/simplegrad.git
cd simplegrad
pip install -e .
```
## Features
- Automatic differentiation (Autograd)
- Tensor operations
- Neural network building blocks
- Linear layers
- Loss functions
- SGD optimizer
- DataLoader
- NumPy-based implementation
- Lightweight and easy to understand
## Example
```python
from simplegrade import Tensor
a = Tensor([[1, 2, 3]], requires_grad=True)
b = Tensor([[2, 1, 0]], requires_grad=True)
c = a + b
d = a * b
loss = d.sum()
loss.backward()
print("Loss:", loss)
print("Gradient of a:", a.grad)
print("Gradient of b:", b.grad)
```
## Project Links
- **PyPI:** https://pypi.org/project/simplegrade/
- **GitHub:** https://github.com/mohamedrxo/simplegrad
- **Issues:** https://github.com/mohamedrxo/simplegrad/issues
## Contributing
Contributions, bug reports, feature requests, and suggestions are welcome. If you find this project useful, consider starring the repository on GitHub.
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
simplegrade-0.1.4.tar.gz
(8.0 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 simplegrade-0.1.4.tar.gz.
File metadata
- Download URL: simplegrade-0.1.4.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae4e9957e859bbea9d423de2ee423734b1b0841032aecf2c7a5f8ead7cdcf15f
|
|
| MD5 |
90af590fae64ac503635f03bb8b92b52
|
|
| BLAKE2b-256 |
05fb4a7293352f69a98e84804e964ad3d4f670840de384f53f51839a923c7d90
|
File details
Details for the file simplegrade-0.1.4-py3-none-any.whl.
File metadata
- Download URL: simplegrade-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fee553ab20be665898c7762c58274ffd983d66dcb77ff20432a72f7dd6cb334
|
|
| MD5 |
d6a2eef4c4af795928e740e70a3ede76
|
|
| BLAKE2b-256 |
ce980522ddd9d01ca9518d5df7fddd658608d4a375438a97fd22b336798c608c
|