Solved by ptrblck in post #4 
              
              
                If I understand the code correctly, get_dis_xy will return two tensors, which were not created by the generator (or if they were, then they are detached in these lines of code, since they are re-wrapped in the deprecated Variable class). 
You could check for gradients in the generator after the bac…