How to find Pytorch version installed on your machine

Run the following command to enter into the python console

python3

Enter the following two lines in the console:

import torch;
torch.__version__

The terminal will return the torch version installed on yoru machine. The output will be like this:

'1.12.1'