Pycharm中运行yolov5-pytorch出现错误“TypeError: can‘t convert cuda:0 device type tensor to numpy....“
Pycharm中运行yolov5-pytorch出现错误"TypeError: can't convert cuda:0 device type tensor to numpy...."
·
具体错误如下:
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()"即可
更多推荐



所有评论(0)