pytorch check version code example
Example 1: get pytorch version
import torch
print(torch.__version__)
Example 2: get the torch version
import torch
print(torch.__version__)
Example 3: python check version
python --version
import torch
print(torch.__version__)
import torch
print(torch.__version__)
python --version