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 memory leak in pytorch_imagenet_resnet50.py example #641

Merged
merged 1 commit into from Nov 22, 2018

Conversation

Projects
None yet
3 participants
@una-dinosauria

una-dinosauria commented Nov 21, 2018

The current examples reduces the loss which, during training, carries with itself the computation graph. This results in a memory leak which in my case resulted in OOM errors.

Detaching the variable before reduction solved the memory leak for me.

@CLAassistant

This comment has been minimized.

CLAassistant commented Nov 21, 2018

CLA assistant check
All committers have signed the CLA.

@alsrgv

alsrgv approved these changes Nov 22, 2018

Thanks for the PR, LGTM!

I will merge with failing tests since the cause of failure is unrelated and being addressed separately.

@alsrgv alsrgv merged commit 6bac3dd into uber:master Nov 22, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment