Greetings.
I am pretty new to the Pytorch framework and I am starting to move my first steps with it.
At the moment I am stuck with the official image recognition tutorial( https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html 2 ), more precisely in the GPU part.
After adding to the normal CPU code: “net.to(device)” with CUDA as device and “inputs, labels = inputs.to(device), labels.to(device)”, every time I try to run the code, this error appears after the whole training: "
Traceback (most recent call last):
File “net.py”, line 100, in 
outputs = net(images)
File “/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “net.py”, line 22, in forward
x = self.pool(F.relu(self.conv1(x)))
File “/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/torch/nn/modules/conv.py”, line 320, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same"
I have already tried to find something on Google but I can’t find a way to make this program work since every one is implementing it in a different way.
Can someone help?