-
Notifications
You must be signed in to change notification settings - Fork 32
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
Resizing support/progressive growing support #2
Comments
Hi! Thank you for the comment! Firstly, two question: I understood what you are proposing with the progressive growing. I actually have written the blending procedure code for the ProGAN in my pro_gan_pytorch package so I could reuse it here. I'll also try the nsheppard's bottleneck_loss edit. I can see how that might be helping. Thanks Besides, could you tell me a bit more about what exactly is advanced in nsheppard's VGAN compared to my code? That would be really helpful. Thank you! Best regards, |
|
To clarify, the - total_loss = loss + (beta * bottleneck_loss)
+ total_loss = loss + (beta * max(0, bottleneck_loss)) And bottleneck_loss itself would be left alone. The main benefit of the - beta_new = max(0, beta + (self.alpha * bottleneck_loss))
+ beta_new = max(0, beta + (self.alpha * min(1.0, bottleneck_loss))) This edit makes sure that beta doesn't explode at the start of training (even with higher values of alpha), and so even if beta overshoots and is too large, it comes back down to the optimal value in a reasonable period of time. |
Sorry for the late reply. I was laden with too much work and was also a bit unwell on the weekend. @gwern, @nshepperd, Best regards, |
Hiya. I've been experimenting with generating anime faces with GANs for years now, and I've been trying out your GAN implementation to compare with another (more complex) VGAN implementation by nsheppard (currently called PokeGAN), using ~137k anime faces extracted from my Danooru2017 dataset. The results so far are as good as anything I've gotten aside from Nvidia's ProGAN implementation; samples from a few minutes ago after about 2 days:
For speed, I am using 128px. At some point when it's converged, it'd be nice to switch to 256px and then 512px without restarting from scratch. Some support for adding on additional layers would be great; the exact 'blending' ProGAN does might be a bit hard to implement, but almost as good would be freezing the original layers for a while and training only the new ones; or even just slapping on more layers would be better than restarting from scratch (given how minibatches go down drastically with increased resolution).
On a side note, there's one trick nsheppard found which might be useful. We don't know if the official VGAN code does this because it seems kind of obvious in retrospect but they haven't released source AFAIK. But in the bottleneck loss with the KL loss, it seems that occasionally
i_c
can be larger than the KL loss, in which case the loss is then negative? It's not clear what this means or how it might be desirable, so he just got rid of it by bounding it to zero:It seems to permit stable training with much higher values of
i_c
.The text was updated successfully, but these errors were encountered: