You are doing:



 Akash_Tadwai:

data.to(device)     # Converting to cuda tensors
target.to(device)   # Converting to cuda tensors



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