device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
x, y = x.to(device), y.to(device)
GPU与CPU版本兼容性问题
最新推荐文章于 2024-08-11 10:03:27 发布
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
x, y = x.to(device), y.to(device)