import cv2 import torch print(torch.__version__) use_cuda = torch.cuda.is_available() # 是否有可用的gpu print(use_cuda)