📅  最后修改于: 2022-03-11 14:47:21.386000             🧑  作者: Mango
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
#ædevice = torch.device("cuda:0")
device1 = torch.device("cuda:1")
for batch_idx, (img, label) in enumerate(train_loader):
img=img.to(device)
label=label.to(device)