打开pytorch官网
选择对应选项,我的cuda是11.2版本的,选择相近的11.1
在这里插入图片描述
把底下的命令copy去cmd执行即可安装
conda:

conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge

pip:

pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐