Under Windows 10 PyTorch installation and commissioning

First, be careful not to directly use pip install torch, will complain.

Open PyTorch official website: https://pytorch.org/get-started/locally/

The operating system, installed version and installation tools to choose according to their needs, the page will automatically generate the install command, open a command line enter the installation command.

After installation can use the following code debugging

import torch

print(torch.__version__)        #torch版本
print('gpu:', torch.cuda.is_available())   #gpu加速是否可用

pip installation tool can refer to blog: https://blog.csdn.net/sinat_40471574/article/details/91354263 

Published 34 original articles · won praise 26 · views 10000 +

Guess you like

Origin blog.csdn.net/sinat_40471574/article/details/104416453