把torch往前放 import torch print("可用GPU数量:", torch.cuda.device_count()) # 应输出4 print("GPU列表:", [torch.cuda.get_device_name(i) for i in range(torch.cuda.device_count())]) # 应显示4张卡名称 mport sys import os