Hi,
I am running the code below on multiple GPU mode. When I take the x,y variables either to cuda() or not, I can not get the whole network running on the same device. Depending on the device, I get this error.
RuntimeError: expected device cuda:1 but got device  cuda:0
RuntimeError: expected device cuda:0 but got device cpu

# x = torch.linspace(0, args.max-1, args.max).cuda()
# y = torch.linspace(0, args.max-1, 4*args.max).cuda()

x = torch.from_numpy(np.linspace(0, args.max-1, args.max))
y = torch.from_numpy(np.linspace(0, args.max-1, 4*args.max))

model = network(args.max, x, y)
model = nn.DataParallel(model)
model.cuda()

I have tried taking x, y into the network, both in cuda and cpu mode, but the same error occurs again.
I would appreciate your help.