Small neural network library in pure Python and numpy.
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.
Aodhnait Étaín 4fb2a16c4c
Remove tensor prefix
2 years ago
assets Add logo to README 2 years ago
pygrad Remove tensor prefix 2 years ago
.gitignore Add rule to ignore __pycache__ 2 years ago
README.md Update README to reflect added support for arrays 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.