pytorch 使用单个GPU与多个GPU进行训练与测试的方法 如下所示:device=torch.device("cuda:0"iftorch.cuda.is_available()else"cpu")#第一行代码model.to(device)#第二 多个GPU