Solved by Mazhar_Shaikh in post #2 
              
              
                In the context of nn Modules, the “to” method is explained in the documentation here. 
The move happens to only parameters and buffers. Hence, moving a loss function like CrossEntropy to GPU doesn’t change anything. In a custom Loss function made subclassing nn.Module, the “.to()” will be inherited …