pytorch get version code example
Example 1: get pytorch version
import torch
print(torch.__version__)
Example 2: get pytorch version
python -c "import torch; print(torch.__version__)"
Example 3: torch conda
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch