<p>The correct is to consider an iteration as a batch. 
In the original <a href="https://arxiv.org/pdf/1701.07875.pdf" rel="nofollow noreferrer">paper</a>, for each iteration of the critic/discriminator they are sampling a batch of size <code>m</code> of the real data and  a batch of size <code>m</code> of prior samples <code>p(z)</code> to work it. After the critic is trained over <code>Diters</code> iterations, they train the generator which also starts by the sampling of a batch of prior samples of <code>p(z)</code>.
Therefore, each iteration is working on a batch. </p>

<p>In the <a href="https://github.com/martinarjovsky/WassersteinGAN/blob/master/main.py" rel="nofollow noreferrer">official implementation</a> this is also happening. What may be confusing is that they use the variable name <code>niter</code> to represent the number of epochs to train the model. Although they use a different scheme to set <code>Diters</code> at lines <a href="https://github.com/martinarjovsky/WassersteinGAN/blob/f81eafd2aa41e93698f203732f8f395abc70be02/main.py#L162" rel="nofollow noreferrer">162</a>-166:</p>

<pre><code># train the discriminator Diters times
    if gen_iterations &lt; 25 or gen_iterations % 500 == 0:
        Diters = 100
    else:
        Diters = opt.Diters
</code></pre>

<p>they are, as in the paper, training the critic over <code>Diters</code> batches.</p>
Wasserstein GAN critic training ambiguity
<p>I'm running a DCGAN-based GAN, and am experimenting with WGANs, but am a bit confused about how to train the WGAN.</p>

<p>In the official <a href="https://github.com/martinarjovsky/WassersteinGAN/blob/master/main.py" rel="nofollow noreferrer">Wasserstein GAN PyTorch implementation</a>, the discriminator/critic is said to be trained <code>Diters</code> (usually 5) times per each generator training.</p>

<p>Does this mean that the critic/discriminator trains on <code>Diters</code> <em>batches</em> or the <em>whole dataset</em> <code>Diters</code> times? If I'm not mistaken, the official implementation suggests the discriminator/critic is trained on the <em>whole dataset</em> <code>Diters</code> times, but other implementations of WGAN (in PyTorch and TensorFlow etc.) do the opposite.</p>

<p>Which is correct? <a href="https://arxiv.org/pdf/1701.07875.pdf" rel="nofollow noreferrer">The WGAN paper</a> (to me, at least), indicates that it is <code>Diters</code> <em>batches</em>. Training on the whole dataset is obviously orders of magnitude slower.</p>

<p>Thanks in advance!</p>