报错如下所示

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

之后点击最下面的一个.py文件,进入model_hook.py文件里面,可以看到

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

直接修改源文件,在detach()后增加cpu()。

修改完成之后的代码图下所示

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

看,可以跑起来了,但是就是多了很多not supported!

这些东西怎么删除,我不知道了。等下研究

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

相关文章: