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

calling getParameters() twice on same module #556

Open
nicholas-leonard opened this issue Jan 7, 2016 · 2 comments
Open

calling getParameters() twice on same module #556

nicholas-leonard opened this issue Jan 7, 2016 · 2 comments

Comments

@nicholas-leonard
Copy link
Member

Calling getParameters() twice on the same module should return the same tensors.
Basically, it would be nice if this test passed :

local mlp1 = nn.Linear(3, 4)
local p1, gp1 = mlp1:getParameters()
local p2, gp2 = mlp1:getParameters()
p1:add(1); gp1:add(1)
assert(math.abs(p1:sum() - p2:sum()) < 0.000001)
@fmassa
Copy link
Contributor

fmassa commented Jan 12, 2016

I think this is addressed in #563

@nicholas-leonard
Copy link
Member Author

@fmassa great can't wait to see this fixed :)

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

2 participants