You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…e tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first
Updated with the solution:
wengong-jin#40
Hello,
I am using the finetune_generator.py and I am getting the following error. does anybody know how to solve this.
Thanks,
Loading from checkpoint ckpt/inforna-pretrained/model.ckpt.5000
After pruning 257 -> 257
Epoch 0 training...
0%| | 0/13 [00:25<?, ?it/s]
Traceback (most recent call last):
File "/apps/hgraph2graph/20210428/hgraph2graph/finetune_generator.py", line 152, in
meters = meters + np.array([kl_div, loss.item(), wacc * 100, iacc * 100, tacc * 100, sacc * 100])
File "/apps/hgraph2graph/20210428/lib/python3.7/site-packages/torch/_tensor.py", line 732, in array
return self.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
The text was updated successfully, but these errors were encountered: