Skip to main content
. 2021 Dec 28;24(1):55. doi: 10.3390/e24010055
Algorithm 1: Original GAN algorithm
  • fordo# of training iterations:

  •     for k do steps

  •         Sample minibatch z(1),,z(m)pg(z)

  •         Sample minibatch x(1),,x(m)pd(x)

  •         Update the weights of the discriminator by ascending its stochastic gradient:
    θD1mi=1mlogDisx(i)+log1DisGenz(i)
  •     end for

  •     Sample minibatch z(1),,z(m)pg(z)

  •     Update the weights of the generator by descending its stochastic gradient:
    θG1mi=1mlog1DisGenz(i).
  • end for