Update tensor.py
Otherwise `.cpu()` is broken if default is GPU
MODIFY
tinygrad/tensor.py
tinygrad/tensor.py
@@ -145,7 +145,7 @@ class Tensor:
def cpu(self):
if self.gpu:
- ret = Tensor(np.empty(self.shape, dtype=np.float32))
+ ret = Tensor(np.empty(self.shape, dtype=np.float32), gpu=False)
cl.enqueue_copy(cl_queue, ret.data, self.data)
if self.grad:
ret.grad = self.grad.cpu()

Update tensor.py (#128)

Otherwise `.cpu()` is broken if default is GPU