Open animebing opened 6 years ago
@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
function StyleLoss:updateGradInput
neural_gram.lua
self.gradInput:mul(self.strength)
we should firstly do
self.gradInput:cmul(msk)
and then do
self.gradInput:add(gradOutput)
@luanfujun, when I read the code
function StyleLoss:updateGradInput
inneural_gram.lua
, I find maybe there is something wrong about the gradient computation, afterwe should firstly do
and then do