martinarjovsky / WassersteinGAN

BSD 3-Clause "New" or "Revised" License
3.2k stars 725 forks source link

Generator update #80

Closed JurijsNazarovs closed 2 years ago

JurijsNazarovs commented 2 years ago

Hello,

In the lines 225-226 of the main.py should not it be errG.backward(mone) (minus sign) and not :

errG = netD(fake)
errG.backward(one)

Similar to this (line 135): https://github.com/igul222/improved_wgan_training/blob/master/gan_mnist.py uses

gen_cost = -tf.reduce_mean(disc_fake)
JurijsNazarovs commented 2 years ago

To whomever it might be helpful:

Generator sign is different from the paper, because of #9, so, we can swipe the sign. Discriminator sign is different, because critic does not use the sigmoid, thus the outputs of critic can be positive or negative. Network will learn what to apply.