Search code examples
pythontensorflowdcgan

DCGANs: discriminator getting too strong too quickly to allow generator to learn


I am trying to use this version of the DCGAN code (implemented in Tensorflow) with some of my data. I run into the problem of the discriminator becoming too strong way too quickly for generator to learn anything.

Now there are some tricks typically recommended for that problem with GANs:

  • batch normalisation (already there in DCGANs code)

  • giving a head start to generator.

I did some version of the latter by allowing 10 iterations of generator per 1 of discriminator (not just in the beginning, but throughout the entire training), and that's how it looks: Loss functions of generator and discriminator

Adding more generator iterations in this case helps only by slowing down the inevitable - discriminator growing too strong and suppressing the generator learning.

Hence I would like to ask for an advice on whether there is another way that could help the problem of a too strong discriminator?


Solution

  • To summarise this topic - the generic advice would be:

    • try playing with model parameters (like learning rates, for instance)
    • try adding more variety to the input data
    • try adjusting the architecture of both generator and discriminator networks.

    However, in my case the issue was the data scaling: I've changed the format of the input data from the initial .jpg to .npy and lost the rescaling on the way. Please note that this DCGAN-tensorflow code rescales the input data to [-1,1] range, and the model is tuned to work with this range.