调错 RuntimeError: CUDA error: the launch timed out and was terminated
主要是对于双显卡的电脑运行深度学习分割代码报错(运行 predict.py 时候报错)参考这一篇cuda运行错误:the launch timed out and was terminated in_Liber-coder的博客-CSDN博客该方法并没有解决代码报错考虑到是GPU报错,调用的问题我们更换调用的GPU换成独立显卡CUDA_VISIBLE_DEVICES='0'#表示调用0块GPU或者
·
主要是对于双显卡的电脑
运行深度学习分割代码报错(运行 predict.py 时候报错)

参考这一篇cuda运行错误:the launch timed out and was terminated in_Liber-coder的博客-CSDN博客

该方法并没有解决代码报错
考虑到是GPU报错,调用的问题
我们更换调用的GPU
换成独立显卡
CUDA_VISIBLE_DEVICES='0' #表示调用0块GPU
或者
import os
os.environ["CUDA_DEVICES_ORDER"]="PCI_BUS_IS"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
没有报错,成功运行
更多推荐

所有评论(0)