windows安装CPU版Pytorch-0.4.0

参考网址:https://blog.csdn.net/qq_34374211/article/details/80086931

1.打开cmd

2.pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-win_amd64.whl

注:我用的python3.5版本,如果你用的3.6,需要改成:pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl

3.安装torchvision:

pip install torchvision

4.验证是否安装完成:

python

>>>import torch

>>>from torch import nn

>>>from torch.autograd import Variable

>>>exit()

附: 1.pytorch的github:https://github.com/pytorch/pytorch/releases

        2.安装版本选择:http://pytorch.org/

你可能感兴趣的:(windows安装CPU版Pytorch-0.4.0)