Pytorch环境配置

Pytorch配置环境

cuda与cudnn的下载

cudatoolkit下载:https://developer.nvidia.com/cuda-toolkit-archive

cudnn下载:https://developer.nvidia.com/rdp/cudnn-archive

cuda支持情况:https://developer.nvidia.com/cuda-gpus#compute

cuda和cudnn的对应关系:https://developer.nvidia.com/rdp/cudnn-archive#a-collapse742-10

使用 PyTorch 查看 CUDA 和 cuDNN 版本

import torch
print(torch.__version__)

print(torch.version.cuda)
print(torch.backends.cudnn.version())

安装命令

配置清华源码

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

安装命令

pip install torch==1.10.1+cu102 torchvision==0.11.2+cu102 torchaudio==0.10.1+cu102 -f https://download.pytorch.org/whl/torch_stable.html

版本对应:

torchtorchvision对应关系,来源:官方Repo: vision

torch torchvision python
main / nightly main / nightly >=3.8, <=3.10
2.0.0 0.15.1 >=3.8, <=3.10
1.13.0 0.14.0 >=3.7.2, <=3.10
1.12.0 0.13.0 >=3.7, <=3.10
1.11.0 0.12.3 >=3.7, <=3.10
1.10.2 0.11.3 >=3.6, <=3.9
1.10.1 0.11.2 >=3.6, <=3.9
1.10.0 0.11.1 >=3.6, <=3.9
1.9.1 0.10.1 >=3.6, <=3.9
1.9.0 0.10.0 >=3.6, <=3.9
1.8.2 0.9.2 >=3.6, <=3.9
1.8.1 0.9.1 >=3.6, <=3.9
1.8.0 0.9.0 >=3.6, <=3.9
1.7.1 0.8.2 >=3.6, <=3.9
1.7.0 0.8.1 >=3.6, <=3.8
1.7.0 0.8.0 >=3.6, <=3.8
1.6.0 0.7.0 >=3.6, <=3.8
1.5.1 0.6.1 >=3.5, <=3.8
1.5.0 0.6.0 >=3.5, <=3.8
1.4.0 0.5.0 ==2.7, >=3.5, <=3.8
1.3.1 0.4.2 ==2.7, >=3.5, <=3.7
1.3.0 0.4.1 ==2.7, >=3.5, <=3.7
1.2.0 0.4.0 ==2.7, >=3.5, <=3.7
1.1.0 0.3.0 ==2.7, >=3.5, <=3.7
<=1.0.1 0.2.2 ==2.7, >=3.5, <=3.7

torchtorchaudio对应关系,来源:官方Repo: audio

torch torchaudio python
main / nightly main / nightly >=3.8, <=3.10
2.0.1 2.0.2 >=3.8, <=3.11
2.0.0 2.0.1 >=3.8, <=3.11
1.13.1 0.13.1 >=3.7, <=3.10
1.13.0 0.13.0 >=3.7, <=3.10
1.12.0 0.12.0 >=3.7, <=3.10
1.11.0 0.11.0 >=3.7, <=3.9
1.10.0 0.10.0 >=3.6, <=3.9
1.9.1 0.9.1 >=3.6, <=3.9
1.9.0 0.9.0 >=3.6, <=3.9
1.8.2 0.8.2 >=3.6, <=3.9
1.8.1 0.8.1 >=3.6, <=3.9
1.8.0 0.8.0 >=3.6, <=3.9
1.7.1 0.7.2 >=3.6, <=3.9
1.7.0 0.7.0 >=3.6, <=3.8
1.6.0 0.6.0 >=3.6, <=3.8
1.5.0 0.5.0 >=3.5, <=3.8
1.4.0 0.4.0 ==2.7, >=3.5, <=3.8
  • 当已经装好torch包时,pip install torchvision torchaudio会自动寻找对应的版本安装。 等待再次验证是否有效。

备注

帮忙安装各种深度学习环境:anaconda,pycharm,tensorflow,pytorch,虚拟机配置等等,也可帮忙配置和复现顶会论文;可联系[email protected],不是free的哈,伸手党勿扰谢谢

你可能感兴趣的:(pytorch,人工智能,python)