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

problem in cal_gradient_penalty? #185

Open
DreamsofGg opened this issue Apr 24, 2020 · 0 comments
Open

problem in cal_gradient_penalty? #185

DreamsofGg opened this issue Apr 24, 2020 · 0 comments

Comments

@DreamsofGg
Copy link

just the same issue as caogang/wgan-gp#47
how do I understand the following code in

gradient_penalty = ((gradients.norm(2, dim=1) - 1) ** 2).mean() * self.LAMBDA

especially dim=1, it seems that the function calculate pixelwise gradient norm rather than the full image, which is not consistent to formulation in the paper.
looking forward to your reply, thanks!
@KupynOrest

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