# 获取当前设备
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

相关文章: