When I want to put the model on the GPU, I get the following error:
"RuntimeError: Input and hidden tensors are not at the same device, found input tensor at cuda:0 and hidden tensor at cpu"
However, all of the above had been put on the GPU:
for m in model.parameters():
print(m.device) #return cuda:0
if torch.cuda.is_available():
model = model.cuda()
test = test.cuda() # test is the Input
Windows 10 server
Pytorch 1.2.0 + cuda 9.2
cuda 9.2
cudnn 7.6.3 for cuda 9.2