<p>I guess the best way to understand the Generator training procedure is to revise all training loop.</p>

<p>For each epoch:</p>

<ol>
<li><p>Update Discriminator:</p>

<ul>
<li><p>forward real images mini-batch pass through the Discriminator;</p></li>
<li><p>compute the Discriminator loss and calculate gradients for the backward pass;</p></li>
<li><p>generate fake images mini-batch via the Generator;</p></li>
<li><p>forward generated fake mini-batch pass through the Discriminator;</p></li>
<li><p>compute the Discriminator loss and derive gradients for the backward pass;</p></li>
<li><p>add (real mini-batch gradients, fake mini-batch gradients)</p></li>
<li><p>update the Discriminator (use Adam or SGD).</p></li>
</ul></li>
<li><p>Update Generator:</p>

<ul>
<li><p>flip the targets: fake images get labeled as real for the Generator. Note: this step ensures using cross-entropy minimization for the Generator. It helps overcome the problem of Generator's vanishing gradients if we continue implementation of the GAN minmax game.</p></li>
<li><p>forward fake images mini-batch pass through the updated Discriminator;</p></li>
<li><p>compute Generator loss based on the updated Discriminator output, e.g.:</p></li>
</ul>

<p>loss function (the probability that fake image is real estimated by Discriminator, 1).<br>
Note: here 1 represents the Generator label for fake images as real.</p>

<ul>
<li>update the Generator (use Adam or SGD)</li>
</ul></li>
</ol>

<p>I hope this helps. As you can see from the training procedure, GAN players are somewhat "cooperative, in the sense that the discriminator estimates the ratio of data to model distribution densities and then freely shares this information with the generator. From this point of view, the discriminator is more like a teacher instructing the generator in how to improve than an adversary" (cited from <a href="https://arxiv.org/pdf/1701.00160.pdf" rel="nofollow noreferrer">I.Goodfellow tutorial</a>). </p>
How to train generator from GAN?
<p>After reading GAN tutorials and code samples i still don't understand how generator is trained. Let's say we have simple case: 
- generator input is noise and output is grayscale image 10x10
- discriminator input is image 10x10 and output is single value from 0 to 1 (fake or true)</p>

<p>Training discriminator is easy - take its output for real and expect 1 for it. Take output for fake and expect 0. We're working with real output size here - single value.</p>

<p>But training generator is different - we take fake output (1 value) and make expected output for that as one. But it sounds more like training of descriminator again. Output of generator is image 10x10 how can we train it with only 1 single value? How back propagation might work in this case?</p>