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()
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()