Answers.Body: <blockquote>
  <p>in this tutorial, it taught us to intentionally provide false labels to &quot;fool&quot; the discriminator, does it make discriminator actually inaccurate?</p>
  </blockquote>
  <p>When training GANs, the training steps for the generator and discriminator are separate:</p>
  <ul>
  <li><p>There is a training stage for the discriminator, where it is presented with a mix of generated and real data, all correctly labelled. It is important at this stage to not update the generator (otherwise it will get worse by helping to make the fake data look more fake).</p>
  </li>
  <li><p>There is a training stage for the generator, where the <em>discriminator</em> is presented with only generated data, all labelled incorrectly as if it were real. It is important at this stage to not update the discriminator.</p>
  </li>
  </ul>
  <p>Typically you will alternate between the two stages frequently, making small updates to discriminator and generator separately. Some GANs use metrics to decide how much of each to do, because you don't want either the generator or discriminator to win outright and stop progress - at least at the start.</p>
  <p>So yes there is a stage where you deliberately &quot;fool&quot; the discriminator, because being able to do so is the goal of the generator. However, one key detail of this stage is that the discriminator weights are not updated from that faked data. Instead the gradients from that stage are used only to update and improve the generator.</p>
  <p>It may help if you don't think of the false labels as being &quot;fool the discriminator&quot;, but instead they are &quot;measure how well the generator is fooling the discriminator&quot;.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-17T08:00:59.133Z
Answers.LastActivityDate: 2020-11-17T09:00:49.187Z
Answers.LastEditDate: 2020-11-17T09:00:49.187Z
Answers.UserDisplayName: Neil Slater
Body: <p><a href="https://www.pyimagesearch.com/2020/11/16/gans-with-keras-and-tensorflow/" rel="nofollow noreferrer">This</a> is the tutorial that I used to learn about GANs. In this tutorial, it taught us to intentionally provide false labels to &quot;fool&quot; the discriminator, but does it make the discriminator actually inaccurate? I don't quite understand his explanation, can anyone help me?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-17T11:09:21.897Z
Comments.Text: We want to improve the G so we feed into D fake images and tell they are true in order to calculate a gradient towards real images. Take a look at the second part of [this answer](https://ai.stackexchange.com/questions/24094/what-is-the-right-way-to-train-a-generator-in-a-gan/24147#24147). I created an illustration there.
Comments.UserDisplayName: Aray Karjauv
Tags: <computer-vision><training><keras><generative-adversarial-networks>
Title: Why do we need to provide false labels to the discriminator on purpose to train GANs?
UserDisplayName: Gavin
ThreadText: # Why do we need to provide false labels to the discriminator on purpose to train GANs?
  
  (Asked by: username_0 on 2020-11-17)
  
  [This](https://www.pyimagesearch.com/2020/11/16/gans-with-keras-and-tensorflow/) is the tutorial that I used to learn about GANs. In this tutorial, it taught us to intentionally provide false labels to "fool" the discriminator, but does it make the discriminator actually inaccurate? I don't quite understand his explanation, can anyone help me?
  
  **Tags:** computer-vision, training, keras, generative-adversarial-networks
  > **Comments:**
  > **username_1**: We want to improve the G so we feed into D fake images and tell they are true in order to calculate a gradient towards real images. Take a look at the second part of [this answer](https://ai.stackexchange.com/questions/24094/what-is-the-right-way-to-train-a-generator-in-a-gan/24147#24147). I created an illustration there.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-11-17. Score: 2
  
  > in this tutorial, it taught us to intentionally provide false labels to "fool" the discriminator, does it make discriminator actually inaccurate?
  
  When training GANs, the training steps for the generator and discriminator are separate:
  
  * There is a training stage for the discriminator, where it is presented with a mix of generated and real data, all correctly labelled. It is important at this stage to not update the generator (otherwise it will get worse by helping to make the fake data look more fake).
  * There is a training stage for the generator, where the *discriminator* is presented with only generated data, all labelled incorrectly as if it were real. It is important at this stage to not update the discriminator.
  
  Typically you will alternate between the two stages frequently, making small updates to discriminator and generator separately. Some GANs use metrics to decide how much of each to do, because you don't want either the generator or discriminator to win outright and stop progress - at least at the start.
  
  So yes there is a stage where you deliberately "fool" the discriminator, because being able to do so is the goal of the generator. However, one key detail of this stage is that the discriminator weights are not updated from that faked data. Instead the gradients from that stage are used only to update and improve the generator.
  
  It may help if you don't think of the false labels as being "fool the discriminator", but instead they are "measure how well the generator is fooling the discriminator".
  
  
  ---
  
  