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

gradient computation of StyleLoss in neural_gram.lua #16

Open
animebing opened this issue Apr 28, 2018 · 0 comments
Open

gradient computation of StyleLoss in neural_gram.lua #16

animebing opened this issue Apr 28, 2018 · 0 comments

Comments

@animebing
Copy link

@luanfujun, when I read the code function StyleLoss:updateGradInput in neural_gram.lua, I find maybe there is something wrong about the gradient computation, after

self.gradInput:mul(self.strength)

we should firstly do

self.gradInput:cmul(msk)

and then do

self.gradInput:add(gradOutput)
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