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

Problematic Implementation of EMD Loss #4

Closed
VoVAllen opened this issue Aug 5, 2018 · 6 comments
Closed

Problematic Implementation of EMD Loss #4

VoVAllen opened this issue Aug 5, 2018 · 6 comments

Comments

@VoVAllen
Copy link

VoVAllen commented Aug 5, 2018

Should be the L2 distance between CDF of two distributions but not between the PDF of two distributions

And there's some typo in the naming such as emb and emd

@yunxiaoshi
Copy link
Owner

As you say, the implementation is strictly mirrored from the paper, if you take a closer look you will see that the implementation is correct.

@VoVAllen
Copy link
Author

VoVAllen commented Aug 6, 2018

Sorry for the mistake. I realized it's right. Thanks!
Another minor problem I found is Dropout. Due to pytorch features, you need to explicit call model.eval() in valuation and test period to turn the Dropout into right mode to get right forward result.

@yunxiaoshi
Copy link
Owner

Fixed the dropout issue
I didn't see any typo that you mentioned

@VoVAllen
Copy link
Author

VoVAllen commented Aug 6, 2018

可能是我看错了……应该没有typo……

@VoVAllen VoVAllen closed this as completed Aug 6, 2018
@VoVAllen
Copy link
Author

VoVAllen commented Aug 6, 2018

Also I see you might also need to add model.eval() at valuation period

@luqiang360
Copy link

https://github.com/kentsyx/Neural-IMage-Assessment/blob/9c50b3e384a88a8afdc00333d01656be5526bfed/model.py#L36

The EMD loss still seems to be wrong, my opinion is the sum operation should be inside of torch.abs

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