Solved by Gul_Zain in post #2 
              
              
                I solved the problem. One variable which i was initializing within the loss function by the name “processed” was not being put on cuda. 
Thing to keep in mind for these problems is that some variable is not deployed on GPU or CPU whichever device you are using. So a shortcut is to put every single v…