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

GPU memory continue to grow for MAML #62

Open
suoql opened this issue Feb 4, 2021 · 1 comment
Open

GPU memory continue to grow for MAML #62

suoql opened this issue Feb 4, 2021 · 1 comment

Comments

@suoql
Copy link

suoql commented Feb 4, 2021

Hi,

Thank you for sharing the code. When running MAML with conv4 backbone, the memory usage accumulates as epoch increases, causing CUDA out of memory. It seems the problem is caused by grad = torch.autograd.grad(set_loss, fast_parameters, create_graph=True). I tried to set create_graph=False (to approximate first-order MAML), and the memory usage becomes normal. This indicates that the created graph cannot be released after each epoch, if setting create_graph=True.

Did you meet with such problem in training MAML? May I get some suggestions on solving this problem?

Thanks!

@suoql
Copy link
Author

suoql commented Feb 4, 2021

The problem has been resolved by degrade torch version. Please forget about it. :)

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