python-pytorchHow do I get the version of PyTorch I am using?
You can get the version of PyTorch you are using by running the torch.__version__ command.
import torch
print(torch.__version__)
Output example
1.6.0
import torchimports the PyTorch moduletorch.__version__is an attribute that stores the version of PyTorchprint(torch.__version__)prints the version of PyTorch
Helpful links
More of Python Pytorch
- How can I use Yolov5 with PyTorch?
- How can I use Python and PyTorch to parse XML files?
- How can I use Python PyTorch without a GPU?
- How can I use Python PyTorch with CUDA?
- How do I install a Python PyTorch .whl file?
- How do I use nn.linear in Python Pytorch?
- How can I enable CUDA support in Python PyTorch?
- How do I use PyTorch with Python version 3.11?
- What is the most compatible version of Python to use with PyTorch?
- How can I use Python PyTorch without CUDA?
See more codes...