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

无法使用GPU训练 #21

Open
w682511 opened this issue Oct 24, 2020 · 1 comment
Open

无法使用GPU训练 #21

w682511 opened this issue Oct 24, 2020 · 1 comment

Comments

@w682511
Copy link

w682511 commented Oct 24, 2020

您好,我似乎无法使用GPU进行训练,我做了一些尝试但都没有奏效,很抱歉麻烦您,这或许是一个简单的问题,可他确实困扰了很久,希望可以得到您的帮助,告诉我我应该做什么更改呢?感谢您!

@DataXujing
Copy link
Owner

DataXujing commented Oct 26, 2020

请检查你的Pytorch版本和CUDA,及显卡驱动的版本是否一致,并在python解释器或终端中执行:

import torch
torch.cuda.is_available()

如果是True, 则说明你的torch库和显卡的相关版本一致,torch可正常调用GPU,否则你安装的pytorch是有问题的!

附:

# torch版本
import torch
torch.__version__

# cuda版本
$ nvcc

# 显卡驱动版本
$ nvidia-smi -lms 200

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