Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAE not training the discriminator #35

Closed
plaut opened this issue May 9, 2018 · 3 comments
Closed

AAE not training the discriminator #35

plaut opened this issue May 9, 2018 · 3 comments

Comments

@plaut
Copy link

plaut commented May 9, 2018

The adversarial autoencoder doesn't seem to be training the discriminator. The discriminator accuracy remains stuck at around 50%. In addition, fake images that I generated from random Gaussian codes did not look anything like MNIST digits. In fact, they did not look any different from fake images when setting the discriminator's loss weight to zero in the autoencoder model, which is equivalent to a simple non-adversarial autoencoder.

The problem seems to be related to the batch normalization layers in the discriminator: after removing both of them, the discriminator accuracy fluctuates during training and fake images generated from random Gaussian codes look much more like real digits (I also increased the discriminator's loss weight in the autoencoder model).

@plaut
Copy link
Author

plaut commented May 10, 2018

Changing the order of the layers so that BatchNormalization is before each LeakyReLU instead of after it also seems to help, but completely removing BatchNormalization from the discriminator is giving me the best looking fake images.

@2017develper
Copy link

Keras-GAN/aae/adversarial_autoencoder.py
i want to save the model how i can do it

@eriklindernoren
Copy link
Owner

Hi,

This should be fixed in ce7dc22. Reducing the dimensionlity of the latent code made a big difference in the visual quality of generated samples. Removing the BN layers also helped.

Cheers,
Erik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants