taoxugit / AttnGAN

MIT License
1.33k stars 415 forks source link

fix noise is used for training #101

Closed wtliao closed 2 years ago

wtliao commented 2 years ago

Hi, thanks for sharing your brilliant work. I am a little confused when I read your code in trainer.py line 227 where a set of fixed noise is sampled before the training loop of epoch, which means the whole following training process used the fixed noise. As far as I know about GAN, the noise should not be fixed. If a set of fixed noise vectors is used for training, the model will lose generalization ability, which means when the input noise vector is randomly sampled, the model cannot generate a good image. When I use your code and trained model to generate images with randomly sampled noise, the results are very bad. Please let me know where I have missed understanding or incorrect setting. Thanks in advance!

wtliao commented 2 years ago

I have misunderstood. In the iteration loop the noise is resampled.