pygrad/README.md

31 lines
557 B
Markdown
Raw Normal View History

2020-11-14 23:01:51 +00:00
<p align="center">
<img src="./assets/logo.png" style="max-width: 50%;"/>
</p>
---
2020-11-14 19:27:42 +00:00
Neural network library written in Python completely from scratch, using only numpy.
## Usage
```
import nn
2020-11-14 20:58:11 +00:00
a, b = Tensor(2), Tensor(3)
2020-11-14 19:27:42 +00:00
c = a.mul(b)
2020-11-14 20:58:11 +00:00
d = c.exp()
d.backward()
2020-11-14 19:27:42 +00:00
2020-11-14 20:58:11 +00:00
print(a.grad, b.grad, c.grad)
# should output (1210.2863804782053, 806.8575869854702, 403.4287934927351)
2020-11-14 19:27:42 +00:00
```
## References
- <https://github.com/geohot/tinygrad/>
- <https://github.com/karpathy/micrograd/>
## Copying
This is free and unencumbered software released into the public domain.