mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
* 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>
11 lines
199 B
Python
Executable File
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))
|