Solved by ptrblck in post #2 
              
              
                This post explains the error. 
The generator was already updated, while you are trying to calculate the gradients again via d_loss.backward() using stale forward activations. 
Detach generated_sample before passing it to the discriminator and it should work. 
PS: you can post code snippets by wrappi…