具体错误如下:
TypeError: can’t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

解决方法:
1.根据提示,打开对应文件夹下的py文件
在这里插入图片描述
2.在此处添加".cpu()"即可
在这里插入图片描述

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐