soumith / ganhacks

starter from "How to Train a GAN?" at NIPS2016
11.43k stars 1.66k forks source link

Discriminator with accuracy 1, generator fools it perfectly. What's going on? #45

Open danielegrattarola opened 6 years ago

danielegrattarola commented 6 years ago

I'm training a GAN where the discriminator has almost perfect accuracy (generated samples are classified 0, true samples are classified 1), but at the same time the generator is able to produce samples that fool the discriminator perfectly (always classified 1). I'm guessing this is a vanishing gradient problem, but I cannot figure out how to solve it. All usual hacks don't seem to work.

Does anybody have some suggestions?

davesean commented 5 years ago

I'm training a GAN where the discriminator has almost perfect accuracy (generated samples are classified 0, true samples are classified 1), but at the same time the generator is able to produce samples that fool the discriminator perfectly (always classified 1). I'm guessing this is a vanishing gradient problem, but I cannot figure out how to solve it. All usual hacks don't seem to work.

Does anybody have some suggestions?

What does the output look like by the generator?

adv-ai-tech commented 5 years ago

It is due to mode Collapse. The Generator knows some samples that can fool the discriminator and it always produces the same and fools D

zyong812 commented 5 years ago

I have the same problem. I solved this by modifying the net architecture of D, perhaps it is because the previous D is easy to fool.

micklexqg commented 5 years ago

It is due to mode Collapse. The Generator knows some samples that can fool the discriminator and it always produces the same and fools D

so, how to solve it?

micklexqg commented 5 years ago

I have the same problem. I solved this by modifying the net architecture of D, perhaps it is because the previous D is easy to fool.

i used the paper D and did not do any change , but it was still the same. why i came across the problem while they did not?