Solved by theevann in post #2 
              
              
                You are doing: 

But you should be doing: 
data = data.to(device)     # Converting to cuda tensors
target = target.to(device)   # Converting to cuda tensors