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

DBN implementation may cause gpu memory leaks. #1

Open
Tangshitao opened this issue Jun 27, 2019 · 0 comments
Open

DBN implementation may cause gpu memory leaks. #1

Tangshitao opened this issue Jun 27, 2019 · 0 comments

Comments

@Tangshitao
Copy link

Tangshitao commented Jun 27, 2019

I tried to run DBN, but the implementation cause gpu memory leaks in my computer whose torch version is 0.4.1. I fix this by changing the following lines of codes
self.running_mean = (1. - self.momentum) * self.running_mean + self.momentum * mean
self.running_projection = (1. - self.momentum) * self.running_projection + self.momentum * wm
to
self.running_mean = (1. - self.momentum) * self.running_mean + self.momentum * mean.data
self.running_projection = (1. - self.momentum) * self.running_projection + self.momentum * wm.data

@Tangshitao Tangshitao changed the title DBN implementation may cause gpu memory leakage. DBN implementation may cause gpu memory leaks. Jun 27, 2019
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