linux安装torch

首先查看cuda版本

nvcc -V

如下版本为11.3

在这里插入图片描述

使用官网链接下载非常的慢, 并且很有可能超时失败, 在官网命令之后添加

-i https://pypi.tuna.tsinghua.edu.cn/simple 使用清华源下载,大大提速

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113  -i https://pypi.tuna.tsinghua.edu.cn/simple
Logo

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

更多推荐