hgraph2graph
hgraph2graph copied to clipboard
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first
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
In train_generator.py
, change line 96 to:
meters = meters + np.array([kl_div, loss.item(), wacc.cpu() * 100, iacc.cpu() * 100, tacc.cpu() * 100, sacc.cpu() * 100])
Thanks.