Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.cuda.is_available()为false #3

Open
WuJiaMian opened this issue Dec 1, 2022 · 3 comments
Open

torch.cuda.is_available()为false #3

WuJiaMian opened this issue Dec 1, 2022 · 3 comments

Comments

@WuJiaMian
Copy link

作者您好,想请问一下您所用的各个包以及python的版本是多少哇 为什么我下载您的代码用不了cuda 但是其他所有程序都没问题 唯独您的这个代码显示torch.cuda.is_available()为false,请问是您所用的python版本太高了吗?

@Houruizhi
Copy link
Owner

把下面这两句删掉试试看呢?这个代码结构挺简单,用任何版本的pytorch应该都是可以的

os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = ','.join([str(i) for i in cfg.SYSTEM.GPU_IDS[:cfg.SYSTEM.NUM_GPUS]])

@WuJiaMian
Copy link
Author

谢谢作者!上面那个问题解决了!但是又出现一个新问题说NotADirectoryError: [WinError 267] 目录名称无效。: './checkpoints/SIAT/SIAT_dncnn_15.0/net.pth' 请问这个是怎么回事啊?

@Houruizhi
Copy link
Owner

这就是你自己的路径问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants