为了方便多个深度学习框架的环境配置,推荐使用conda进行搭建。
1. anaconda/miniconda下载地址
anacoonda官方下载地址:
miniconda官方下载地址:
Latest Miniconda installer links by Python version — miniconda documentation
清华镜像源的下载地址:
Index of /anaconda/archive/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
Index of /anaconda/miniconda/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
2.CUDA/cuDNN下载地址:
CUDA Toolkit Archive | NVIDIA Developer
CUDA Deep Neural Network (cuDNN) | NVIDIA Developer(需要邮箱注册下载)
3.torch/torchvision下载地址:
官方下载地址:PyTorch(pip命令推荐使用镜像源进行加速)
Previous PyTorch Versions | PyTorch
手动下载地址:https://download.pytorch.org/whl/torch_stable.html
下方是版本对应关系:
4.cuda和torch的对应版本
5.国内常用的镜像源:
清华镜像(首选) | https://pypi.tuna.tsinghua.edu.cn/simple/ |
中科大镜像 | https://pypi.mirrors.ustc.edu.cn/simple/ |
豆瓣镜像 | http://pypi.douban.com/simple/ |
阿里云镜像 | https://mirrors.aliyun.com/pypi/simple/ |
设置默认镜像源 | pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ |
6.查看安装的torch版本命令:
import torch
print(torch.__version__)
print(torch.version.cuda)
print(torch.backends.cudnn.version())