运行mmaction2时报错
builtins.RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero.
1.~/.bashrc中添加export CUDA_VISIBLE_DEVICES=0
2.代码中加入
import os
os.environ['CUDA_VISIBLE_DEVICES'] =‘0’
3.重启服务器
在运行mmaction2时遇到CUDA未知错误,提示可能由于环境配置不正确,特别是CUDA_VISIBLE_DEVICES变量在程序启动后被修改。解决方案包括在.bashrc文件中设置CUDA_VISIBLE_DEVICES=0,代码中同样设置该环境变量,并尝试重启服务器来解决这个问题。

2万+

被折叠的 条评论
为什么被折叠?



