Solved by ptrblck in post #2 
              
              
                If your generator was already trained in the first step, you could try to detach the generated tensor from it before feeding it to the discriminator: 
input_data = torch.cat(generated.detach(), real)

This will detach generated from the computation graph, so that the backward pass will stop at this …