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

Worse translation results after updating to pytorch 0.4.0 #27

Open
HsinYingLee opened this issue Jul 20, 2018 · 6 comments
Open

Worse translation results after updating to pytorch 0.4.0 #27

HsinYingLee opened this issue Jul 20, 2018 · 6 comments

Comments

@HsinYingLee
Copy link

Hi all,
After updating to pytorch 0.4.0, I try to train MUNIT on the summer2winter_yosemite dataset from Cyclegan (https://github.com/junyanz/CycleGAN) yet the results are of ill quality. I tried the initial released version of MUNIT before and it worked perfectly well. Is anyone facing the same issue after switching to pytorch 0.4.0?

Here is the snapshot after 150000 iterations:
image

I use the default configuration.

Thank you.

@qilimk
Copy link

qilimk commented Jul 30, 2018

@HsinYingLee I also have the similar problem, how many images do you have in your training set(trainA and trainB)?

@HsinYingLee
Copy link
Author

HsinYingLee commented Jul 31, 2018

@milankolkata According to the the recent commit, the degraded issue is due to setting <track_running_stats=True> for instance normalization. I haven't tried the updated code yet but I believe the problem should be fixed.

@qilimk
Copy link

qilimk commented Jul 31, 2018

@HsinYingLee Thanks for mentioning it. I am trying the new code. How many images did you use when training the model?

@mingyuliutw
Copy link
Collaborator

mingyuliutw commented Jul 31, 2018

@milankolkata In the commit 972e42, the custom layernorm only supports one image per batch. With the new commit 4c21350, it supports multiple images per batch. However, the time required for each iteration would increase about 4 times when you use a batch size greater than 1. (This is due to the change of the way pytorch implements view function in 0.4. For training with batch size greater than 1, please roll back to pytorch 0.3 and use munit_pytorch0.3.

BTW, I am still confirming if the performance is the same for pytorch 0.3 and 0.4.

@qilimk
Copy link

qilimk commented Jul 31, 2018

@mingyuliutw Thanks! I will try munit_pytorch0.3 and hope it could speed the training up. Also, expect the code supports the multi-GPUs in the future.

@mingyuliutw
Copy link
Collaborator

@HsinYingLee and @milankolkata I think the code is now working properly in pytorch 0.4 now.

We spent sometime in the past few days playing with this summer2winter_yosemite256. We found that when enabling explicit cycle consistency loss, the model converges faster and better. The new config file can be found in configs/summer2winter_yosemite256_folder.yaml .

@gcosne gcosne mentioned this issue Jul 11, 2019
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