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

Learn diversity #79

Closed
remega opened this issue Oct 11, 2019 · 9 comments
Closed

Learn diversity #79

remega opened this issue Oct 11, 2019 · 9 comments

Comments

@remega
Copy link

remega commented Oct 11, 2019

Hi Junyan,

Thanks for your impressive work. Recently, I apply BicycleGAN-like framework into my GAN model, hoping it learn to generate diverse results. However, my model seems not sensitve to the latent code at all. The outputs look almost same with differnt latent code, both over training and validation stages, even I enlarge the weights of KL-loss and l1-loss on latent code. My KL_loss is becoming very small during training, but the l1-loss can only be converaged to around 0.7. Do you remember what are converaged values of these losses during your training? And kindly do you have any idea or advice of it? Thanks you so much!

Looking forward to your reply.

Best,
Lai

@junyanz
Copy link
Owner

junyanz commented Oct 11, 2019

If you implement your own model with the BicycleGAN style, I will first test the model without KL loss and L1-loss on z. And then add KL loss and see if it works, and finally add L1-loss. The hyper-parameters in your model might be different from the ones used in our paper. Notably, how to inject noises into the generator is also important. May you want to inject it into multiple layers, or using more recent architecture such as SPADE.

@remega
Copy link
Author

remega commented Oct 12, 2019

Thank you a lot for your advices. Actually, my model can generate real-style outputs, whether adding l1-loss and kl loss. But the model seems to always overlook the latent codes. I have tried add the latent code on every layer of Generator, and I also tried different loss weights. All failed. Do you think there is any other adjustments I can do for highlighting the learning of latent codes? I notice that in your paper you said if E and G were trained simultaneously, the information of latent codes are trend to be hidden, so you only update G via z l1-loss. Do you think if I update EG and G in different frequency would help?

I would appreciate so much if you can give me some advices.

@junyanz
Copy link
Owner

junyanz commented Oct 12, 2019

Do you have a reconstruction loss on the image ||G(x, E(y)) - y||?

@remega
Copy link
Author

remega commented Oct 12, 2019

Yes, I have.

@junyanz
Copy link
Owner

junyanz commented Oct 13, 2019

I see. I think only updating G helps. I recommend that you first start from pix2pix, and gradually add more losses.

@remega
Copy link
Author

remega commented Oct 14, 2019

Thanks a lot for your reply. Actually, I verify my model (and the new task) on a cycleGAN style GAN, to get the realistic output through adjusting the structures and hyper-parameters. But how can I verify if cycleGAN/Pix2Pix style model is able to generate the diversity outputs? Do you have any suggestions on it? Thank you so much.

@junyanz
Copy link
Owner

junyanz commented Oct 14, 2019

To quantify the output diversity, you can use the LPIPS distance. See Sec 5.2 in the BicycleGAN paper for more details.

@remega
Copy link
Author

remega commented Oct 16, 2019

Okay, your advice really helps. Thanks a lot.

@junyanz junyanz closed this as completed Oct 16, 2019
@soon-yau
Copy link

I'm also facing same problem. I implemented BicycleGAN from a version of my pix2pix that works. Then I train my BicycleGAN on facades dataset but it is still stuck at one style. If I over train it, then it ends up with mode collapse than the generator is only producing same image regardless of the input. I wonder if the dataset is no good for this as it is not included in BicycleGAN paper, unlike previously with pix2pix and CyleGan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants