Solved by ptrblck in post #2 
              
              
                It looks like your input tensor is still on the CPU. 
You should push your data as well as the model onto the device: 
data = data.to('cuda')
target = target.to('cuda')
model = model.to('cuda') # assignment not really necessary here

If you want to check the current device of the tensor, just use pr…