google / compare_gan

Compare GAN code.
Apache License 2.0
1.82k stars 317 forks source link

Critical error in the implementation of compare_gan vs the official BigGAN model #54

Open shawwn opened 3 years ago

shawwn commented 3 years ago

Hello. After roughly one year and 200+ training runs, I finally narrowed down why compare_gan fails to achieve any kind of reasonable result for BigGAN-Deep, and why it fails to achieve the same FID for vanilla BigGAN.

The answer is that it's missing a + 1 in the conditional batch norm function. Specifically, you must add 1 to gamma so that it's centered around 1. Without this, the model is basically multiplied by zero to start with.

Good luck to whoever finds this, and godspeed. (Twitter thread with proof that BigGAN-Deep works now: https://twitter.com/theshawwn/status/1342684798905688065 feel free to DM me with questions or whatever.)