torch.cuda.is_available()返回flase 问题排查

查看torch版本是否为GPU版本

复制代码
import torch
print(torch.__version__)    //我的是CPU版本

如果不是GPU版本下载GPU版本

  • 查看cuda版本

    nvcc --version

    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2022 NVIDIA Corporation
    Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022
    Cuda compilation tools, release 11.8, V11.8.89
    Build cuda_11.8.r11.8/compiler.31833905_0 //我的是11.8版本

  • 下载与cuda版本一致的pytorch

    //下载pytorch 11.8版本,去pytorch官网生成11.8对应的pytorch版本

    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

相关推荐
TuringAcademy2 小时前
AAAI爆款:目标检测新范式,模块化设计封神之作
论文阅读·人工智能·目标检测·论文笔记
The Open Group5 小时前
英特尔公司Darren Pulsipher 博士:以架构之力推动政府数字化转型
大数据·人工智能·架构
Ronin-Lotus6 小时前
深度学习篇---卷积核的权重
人工智能·深度学习
.银河系.6 小时前
8.18 机器学习-决策树(1)
人工智能·决策树·机器学习
敬往事一杯酒哈6 小时前
第7节 神经网络
人工智能·深度学习·神经网络
三掌柜6666 小时前
NVIDIA 技术沙龙探秘:聚焦 Physical AI 专场前沿技术
大数据·人工智能
2502_927161286 小时前
DAY 42 Grad-CAM与Hook函数
人工智能
Hello123网站6 小时前
Flowith-节点式GPT-4 驱动的AI生产力工具
人工智能·ai工具
yzx9910136 小时前
Yolov模型的演变
人工智能·算法·yolo
若天明7 小时前
深度学习-计算机视觉-微调 Fine-tune
人工智能·python·深度学习·机器学习·计算机视觉·ai·cnn