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

Progressive growing of GANs? #101

Open
shi-weili opened this issue Apr 30, 2019 · 5 comments
Open

Progressive growing of GANs? #101

shi-weili opened this issue Apr 30, 2019 · 5 comments
Labels
enhancement New feature or request feature New Feature

Comments

@shi-weili
Copy link
Contributor

I've been using TorchGAN to train the global generator/discriminator of pix2pixHD and got great results. I wonder if it's supported to load the pre-trained global models, add local enhancer layers on top of it, and continue the training?

If the current trainer doesn't support this, could I have some directions on how to implement it? Thanks!

@shi-weili shi-weili added enhancement New feature or request feature New Feature labels Apr 30, 2019
@avik-pal
Copy link
Member

avik-pal commented May 1, 2019

Progressive GAN can be supported by the default trainer. But it will not be a very pretty solution.

You could train the global model. Now assuming that you named your models discriminator and generator you could get those attributes of the trainer. Now add the local enhancer layers as you wish to these, call them discriminator2 and generator2. Now simply replace the values of the original attributes with these new updated values. Next train as usual. And continue like this till u want to add more enhancer layers.

(BTW: Do you have the pix2pixHD code available in a public repo? If yes, I would love to link it in the model-zoo readme)

@shi-weili
Copy link
Contributor Author

shi-weili commented May 1, 2019

@avik-pal Thanks for the notes! I'll try it out. My implementation also makes use of mixed-precision training with AMP (which I'll try to make a pull request to TorchGAN), so I'll need to see if the approach you suggested works for models processed by AMP.

I have an implementation of the essential parts of the global generator/discriminator of pix2pixHD (not including label encoder, instance map, or VGG loss). Currently, it's a private repo with a custom Dataset class. If you'd like to link it, I'll repost the model and loss as a public repo probably later this month.

@avik-pal
Copy link
Member

avik-pal commented Jul 1, 2019

@shi-weili were you able to make any progress on this? If you need any help, we can try to figure something out

@shi-weili
Copy link
Contributor Author

Thanks for the check-in @avik-pal ! I'll have my GPU available for the experiment in August (it's currently being used for some more urgent rendering task). Hopefully you'll still be available to help by then. 😄

(Also: I haven't forgotten to share my model. Will find some time to do so.)

@avik-pal
Copy link
Member

avik-pal commented Jul 2, 2019

Yeah sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature New Feature
Projects
None yet
Development

No branches or pull requests

2 participants