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

Possible Memory leak #79

Open
isaacdevlugt opened this issue Mar 27, 2019 · 0 comments
Open

Possible Memory leak #79

isaacdevlugt opened this issue Mar 27, 2019 · 0 comments
Labels
bug Something isn't working Priority: Medium Size: Medium For moderately sized issues

Comments

@isaacdevlugt
Copy link
Contributor

In the gibbs sampling routine, the "requires_grad=True" flag in the weights and biases pollutes the routine. I ran into this problem in my multinomial RBM code. We never clear the gradient cache for just wanting to sample the RBM, so the loop over the number of gibbs steps builds and builds the cache. Can be fixed (I think) with just saying "with torch.no_grad():" then the gibbs sampling routine commences (bypasses any "requires_grad=True" and saving to cache I think).

But we might run into issues if we have this there because during training we need to sample the RBM of course, so I'm unsure what "with torch.no_grad():" will do during training since we actually need "requires_grad = True".

@emerali emerali added bug Something isn't working Size: Medium For moderately sized issues Priority: Medium labels Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Medium Size: Medium For moderately sized issues
Projects
None yet
Development

No branches or pull requests

2 participants