import torch print(torch.__version__) print(torch.version.cuda)
输出结果
安装Pytorch如何选择CUDA的版本
Pytorch版本yolov3部分代码语句分析