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 torch
imports 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 create a Zoom application?
- What is the best version of Python to use with PyTorch?
- How can I use Python, PyTorch, and YOLOv5 to build an object detection model?
- How do I upgrade PyTorch using Python?
- How can I use the @ operator in Python with PyTorch?
- How do I use PyTorch with Python 3.7?
- How can I implement Deep Deterministic Policy Gradients (DDPG) using PyTorch?
- How can I use the Python PyTorch API to develop a machine learning model?
- How can I use Python and PyTorch together with Xorg?
See more codes...