问题 RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cuda:1 RuntimeError: module必须在设备cuda:0 (device_ids[0])上有它的参数和缓冲区,但在设备:cuda:1上找到其中一个 解决: 将 model = torch.nn.DataParallel(model) 改为 model = torch.nn.DataParallel