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

Incorrect conjugate function in f-GAN implementation #22

Open
weijiaheng opened this issue Oct 8, 2020 · 0 comments
Open

Incorrect conjugate function in f-GAN implementation #22

weijiaheng opened this issue Oct 8, 2020 · 0 comments

Comments

@weijiaheng
Copy link

Describe the bug
In the file "fgan_model.py":
(1) Line 209, the conjugate function of Total-Variation in your code is supposed to be the same as the activation function. Since in your implementation, the conjugate function should be f*(g(x)) where x is the input. Thus, for Total Variation, f*(g(x))=g(x) rather than x;
I think it should be: -torch.mean(torch.tanh(x) / 2.) ?
(2) The conjugate of Jenson-Shannon is also incorrect? Line159;
I think it should be: -torch.mean(x + torch.log(1. + torch.exp(-x))) - torch.log(torch.tensor(2.))?
(3) The conjugate of Hellinger is also incorrect? Line175.
I think it should be: -torch.mean((1. - torch.exp(x)) / (torch.exp(x)))?

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

1 participant