安装教程:
1,首先添加镜像:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
2,下载离线包:https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
在里面选择:pytorch-0.4.1-py36_cuda80_cudnn7he774522_1.tar.bz2(其他的类似)
3,选择下载路径:cd 路径
4,在下载包的路径中打开命令行:conda install --offline (包的名字)
conda install --offline pytorch-0.4.1-py36_cuda80_cudnn7he774522_1.tar.bz2
5,安装torchvision
pip install torchvision
测试CUDA是否安装好
# CUDA TEST
import torch
x = torch.Tensor([1.0])
xx = x.cuda()
print(xx)
# CUDNN TEST
from torch.backends import cudnn
print(cudnn.is_acceptable(xx))
---------------------