运行CUDA_VISIBLE_DEVICES=0 python3.7 .train.py –model model.pkl 报错

在pychrm终端运行:CUDA_VISIBLE_DEVICES=0 python3.7 .\train.py –model model.pkl 报错了,

运行CUDA_VISIBLE_DEVICES=0 python3.7 .train.py --model model.pkl 报错

然后我又在cmd中运行,也同样报错

运行CUDA_VISIBLE_DEVICES=0 python3.7 .train.py --model model.pkl 报错

看了很多篇博客,不是说要在putty里面执行就是要在MobaXterm里面执行,但是这两个我电脑都没有,我就想,有没有简单一点的方法。

还真让我找到了,这篇博客说是因为环境的问题,我想到我的电脑只有一张集成显卡,会不会是这个原因

于是我直接把它设置成了环境变量:

运行CUDA_VISIBLE_DEVICES=0 python3.7 .train.py --model model.pkl 报错

然后直接运行:python .\train.py –model model1.pkl 就行

参考博客:https://blog.csdn.net/qq_40682833/article/details/119215398

Original: https://www.cnblogs.com/LackyQueen/p/16408054.html
Author: LackyQueen
Title: 运行CUDA_VISIBLE_DEVICES=0 python3.7 .train.py –model model.pkl 报错

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/603998/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球