mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-13 08:28:55 +08:00
10 lines
154 B
Python
Executable File
10 lines
154 B
Python
Executable File
#!/usr/bin/env python3
|
|
import numpy as np
|
|
from tinygrad.tensor import Tensor
|
|
|
|
a = Tensor([-2,-1,0,1,2]).ane()
|
|
print(a.cpu())
|
|
b = a.relu()
|
|
print(b.cpu())
|
|
|