Answers.Body: <p>In general, you should train both discriminator D and generator G simultaneously.</p>
  
  <p>Depending on the metric that you use as the target for your model, you may encounter a Vanishing gradient problem. It can happen when you implement original loss (i.e. JS-divergence). In that case D can become overconfident regarding fake samples and won't provide any useful feedback to the G. To find out if training fell into this problem, you should plot D and G loss. It will look as follows:</p>
  
  <p><a href="https://i.sstatic.net/rbUWW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rbUWW.png" alt="enter image description here"></a></p>
  
  <p>The original GAN has a lot of problems, that's why I suggest you to use Wasserstein metric. More information you can find in <a href="https://arxiv.org/pdf/1701.07875.pdf" rel="nofollow noreferrer">WGAN paper</a></p>
  
  <p>Here you can find more information about GAN problems:</p>
  
  <ul>
  <li><a href="https://arxiv.org/pdf/1904.08994.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1904.08994.pdf</a></li>
  <li><a href="https://arxiv.org/pdf/1804.00140.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1804.00140.pdf</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-29T14:46:42.063Z
Answers.LastActivityDate: 2020-02-29T14:46:42.063Z
Answers.UserDisplayName: Aray Karjauv
Body: <p>My GANs is like this:</p>
  
  <ul>
  <li>Train an autoencoder (VAE), get the decoder part and use as Generator</li>
  <li>Train Discriminator</li>
  </ul>
  
  <p>After training, do the generation in these steps:</p>
  
  <ul>
  <li>Call Generator to generate an image</li>
  <li>Call the Discriminator to classify the image to see whether it's acceptable</li>
  </ul>
  
  <p>The problem is that the Discriminator says 'false' a lot, which means the generated image is not useful.</p>
  
  <p>How should the Generator change (update weights) when Discriminator doesn't accept its generated image?</p>
  
Tags: <machine-learning><generative-adversarial-networks><generative-model><generator><discriminator>
Title: GANs: Should Generator update weights when Discriminator says false continuously
UserDisplayName: Dan D.
ThreadText: # GANs: Should Generator update weights when Discriminator says false continuously
  
  (Asked by: username_0 on 2020-02-28)
  
  My GANs is like this:
  
  * Train an autoencoder (VAE), get the decoder part and use as Generator
  * Train Discriminator
  
  After training, do the generation in these steps:
  
  * Call Generator to generate an image
  * Call the Discriminator to classify the image to see whether it's acceptable
  
  The problem is that the Discriminator says 'false' a lot, which means the generated image is not useful.
  
  How should the Generator change (update weights) when Discriminator doesn't accept its generated image?
  
  **Tags:** machine-learning, generative-adversarial-networks, generative-model, generator, discriminator
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-29. Score: 2 | Accepted answer
  
  In general, you should train both discriminator D and generator G simultaneously.
  
  Depending on the metric that you use as the target for your model, you may encounter a Vanishing gradient problem. It can happen when you implement original loss (i.e. JS-divergence). In that case D can become overconfident regarding fake samples and won't provide any useful feedback to the G. To find out if training fell into this problem, you should plot D and G loss. It will look as follows:
  
  [![enter image description here](https://i.sstatic.net/rbUWW.png)](https://i.sstatic.net/rbUWW.png)
  
  The original GAN has a lot of problems, that's why I suggest you to use Wasserstein metric. More information you can find in [WGAN paper](https://arxiv.org/pdf/1701.07875.pdf)
  
  Here you can find more information about GAN problems:
  
  * <https://arxiv.org/pdf/1904.08994.pdf>
  * <https://arxiv.org/pdf/1804.00140.pdf>
  
  
  ---
  
  