1
2
3
4
5
6
7
import sys
import torch

#sys模块提供了一系列有关Python运行环境的变量和函数。
print(sys.version)
print(torch.__version__)
print(torch.cuda.is_available())