[pytorch] 查看GPU是否可用
该文章由 AnonymousUser在 2021年09月13日 21:42:00发布
import torch
print(torch.__version__) # 查看torch当前版本
print(torch.version.cuda) #编译当前版本的torch使用的cuda版本号
print(torch.cuda.is_available()) #查看cuda的GPU是否可用
共0条评论
暂无评论