Files
tinygrad/examples/use_ane.py
iainwo 56d44637f3 fixed pylint, formatted python files iwth cblack on localhost (#204)
* fixed pylint, formatted python files iwth cblack on localhost

* Revert "fixed pylint, formatted python files iwth cblack on localhost"

This reverts commit 07e2b88466.

* dedented 4-spaces added linter

Co-authored-by: Iain Wong <iainwong@outlook.com>
2020-12-17 14:37:31 -08:00

11 lines
199 B
Python
Executable File

#!/usr/bin/env python3
import numpy as np
from tinygrad.tensor import Tensor
import time
a = Tensor([-2,-1,0,1,2]).ane()
print(a.cpu())
b = a.relu()
print(b.cpu())
assert(np.all(b.cpu().data >= 0))