Method 1: cmd terminal view
1. win + R to enter the terminal
2. Enter in sequence in the terminal
>>>python
>>>import torch
>>>torch.__version__ //注意version前后是两个下划线
Method 2: View through PyCharm
1. Open Pycharm and enter in the Python console:
import torch
print(torch.__version__) #注意,这里也是两个下划线
You can view the installed version number.
The above method is to query the PyTorch version in the Windows system. If it has not been installed on the machine, you can enter https://pytorch.org/ to query the pip installation command for installation, such as:
pip3 install torch torchvision torchaudio