报错如下所示

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

相关文章:

  • 2022-12-23
  • 2022-02-24
  • 2021-09-08
  • 2021-12-20
  • 2021-04-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-12-22
相关资源
相似解决方案