Pytorch is a deep learning library developed by Facebook that aims to be the numpy for integrating GPU acceleration into the deep learning world. The author studies the Re-id field recently has many based on the Pytoch code, follows up. Because it is not easy to program remotely to a workstation, local development is using Windows (the laptop has poor support for Ubuntu), but Pytoch currently has no official support for Windows (Program version 0.4 starts with support, currently 0.3.1). Fortunately, the user Bajia has been providing packages for Windows.
First, we download the corresponding package according to our environment: Https://pan.baidu.com/s/1dF6ayLr#list/path=%2Fpytorch
1. Note here because the PY3 version only supports 3.5.3 and 3.6.2, if the computer Python version is inconsistent, use Anaconda to create a new environment called PY36
Conda create-n py36 python=3.6 numpy Pyyaml MKL
2. The author installs Cuda 8.0 and CUDNN 6, so the version downloaded in the network disk is:
pytorch-0.3. 1-py36_cuda80_cudnn6he774522_2.tar.bz2
3. After the download is successful, activate py36 first and then perform the Pytorch installation (run cmd as Administrator)
Activate py36
Conda Install pytorch-0.3. 1-PY36_CUDA80_CUDNN6HE774522_2.TAR.BZ2
4. No accident can be installed successfully, continue to install torchvision, first download Torchvison
HTTPS://pypi.python.org/pypi/torchvision The author chooses to present the latest torchvision-0.2. 0-PY2.PY3-NONE-ANY.WHL
5. Installing Tochvision
Pip Install TORCHVISION-0.2.0-PY2.PY3-NONE-ANY.WHL
6. Test, first switch the environment to PY36
Activate Py36python>>> import Torch>>> import torchvision>>> A =torch.rand (1,2)>>> b=a.cuda ()>>>0.5278 0.2514 0.5278 0.2514 0)]
For detailed version, see:
https://zhuanlan.zhihu.com/p/26871672
Https://github.com/peterjc123/pytorch-scripts
Windows Edition Pytorch,torch Concise installation