windows10+pytorch+anaconda4.4.0+python3.6.1+cuda8.0+cudnn5.1

时间:2022-06-09 22:51:46

参考https://zhuanlan.zhihu.com/p/26871672

  • 首先确认windows下cuda8.0及cudnn5.1安装成功
  • 确认anaconda4.4安装成功,python版本3.6.1
  • 下载 pytorch-0.1.12-py36_0.1.12cu80.tar.bz2
  • 进入安装包目录,shift + 右键,在当前目录命令行输入

    conda install numpy mkl cffi
    conda install –offline pytorch-0.1.12-py36_0.1.12cu80.tar.bz2

  • 测试python

    python
    import torch
    import torch
    x = torch.Tensor([1.0])
    xx = x.cuda()
    print(xx)

    from torch.backends import cudnn
    print(cudnn.is_acceptable(xx))

成功