Skip to content

Release MyGrad 2.0.0.dev3

Compare
Choose a tag to compare
@rsokl rsokl released this 05 Mar 18:31
· 260 commits to master since this release
7d312bd

Implements Tensor.__array_function__.

Common numpy functions now have "drop-in" autodiff, when they operate on a tensor:

>>> x = mg.tensor([2., -1., 0.])
>>> numpy.einsum("i,i", x, x).backward()
>>> x.grad
array([ 4., -2.,  0.])