GPU版本torch安装失败

cmd中查看版本

在这里插入图片描述

明明从官网copy的是安装GPU版本的命令,验证却变成了CPU版本

在这里插入图片描述

原因分析:python、torch、torchvision、torchaudio、cuda等等版本不匹配导致自动安装CPU版本

解决方案:

换成以下安装命令,已经开始正常安装了,我的python是3.10
pip install torch2.0.0+cu118 torchvision0.15.1+cu118 torchaudio==2.0.1+cu118 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.mirrors.ustc.edu.cn/simple/在这里插入图片描述

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐