You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
assets | 2 years ago | |
pygrad | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago |
README.md
Neural network library written in Python completely from scratch, using only numpy.
Usage
from pygrad.tensor import Tensor
a, b = Tensor(np.random.randn(3, 1)), Tensor(np.random.randn(1, 3))
c = a.mul(b)
d = c.exp()
d.backward()
print(a.grad, b.grad, c.grad)
# should output something like
# [[-16.51232262 -16.51232262 -16.51232262]]
# [[-53.88103349 -53.88103349 -53.88103349]]
# [[ 3.50417648 3.50417648 3.50417648]
# [15.67424587 15.67424587 15.67424587]
# [16.0131011 16.0131011 16.0131011 ]]
References
Copying
This is free and unencumbered software released into the public domain.