Input type (CUDAFloatTensor) and weight type (CPUFloatTensor) should be the same

In PyTorch, you need to make sure that the operands are in the same context device(both on CPU or both on GPU). Try to convey the model into GPU using:

model = model.cuda()
1 Like