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

* fix bug when ‘nn.hessian.enable()’ the function self:parameters() w… #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bohge
Copy link

@bohge bohge commented Dec 26, 2016

when ‘nn.hessian.enable()’ the function self:parameters() will return 3 results and last one is diagonal elements. not the scale
detail:
nn.hessian.lua

function nn.Module.parameters(self)
if self.weight and self.bias then
return {self.weight, self.bias}, {self.gradWeight, self.gradBias}, {self.diagHessianWeight, self.diagHessianBias}
elseif self.weight then
return {self.weight}, {self.gradWeight}, {self.diagHessianWeight}
elseif self.bias then
return {self.bias}, {self.gradBias}, {self.diagHessianBias}
else
return
end
end

…ill return 3 results and last one is diagonal elements but not the scale.
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

Successfully merging this pull request may close these issues.

1 participant