Generative Adversarial Networks (GANs) in 50 lines of code (PyTorch)
Dev Nag

Thanks for your awesome introduction to GAN.

I notice that in training the detective D, you do backward operation twice, and then call “d_optimizer.step()” to update weights. I wonder will the second backward replace the gradients calculated by the first backward? If so, how could the first backward contribute to the training process of discriminator?

Like what you read? Give Guodong Shen a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.