mehran75 / Forexer

Utilizing sequence models in predicting next forex hits
5 stars 2 forks source link

TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first. #6

Closed mehran75 closed 3 years ago

mehran75 commented 3 years ago
Traceback (most recent call last):
  File "/mnt/240BCADA758C30EE/MyStuff/Projects/Python/MachineLearning/Forexer/main.py", line 147, in <module>
    score = r2_score(y_preds.detach().numpy(), y_test.detach().numpy())
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.