Memory leak in loop with higher.innerloop_ctx!
See original GitHub issueI saw this problem was solved however, I still have it:
I am using the last version of higher 0.1.5, however still have a problem with memory leak:
with higher.innerloop_ctx(model, inner_opt, copy_initial_weights=False) as (fast_model, diffopt):
for step, batch in enumerate(epoch_iterator):
report_memory()
print("-------------")
fast_model.train()
outputs = fast_model(batch)
loss = outputs[0]
diffopt.step(loss)
memory (MB) | allocated: 678.73095703125 | max allocated: 678.73095703125 | cached: 734.0 | max cached: 734.0 memory (MB) | allocated: 1357.4619140625 | max allocated: 2036.19287109375 | cached: 2158.0 | max cached: 2158.0 memory (MB) | allocated: 12340.314453125 | max allocated: 13059.771484375 | cached: 13208.0 | max cached: 13208.0 memory (MB) | allocated: 23322.634765625 | max allocated: 24041.8564453125 | cached: 24190.0 | max cached: 24190.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top Results From Across the Web
node.js - Memory leak - promises in a loop - Stack Overflow
Not sure whether it would be the cause of memory leaks, but your function definitely has a ton of unnecessary cruft that could...
Read more >Possible memory leak with for loop - MATLAB Answers
Possible memory leak with for loop. Learn more about memory, for loop, memory leak MATLAB, Statistics and Machine Learning Toolbox.
Read more >Memory leak in loops - Esri Community
Memory leak in loops ... layer and writes the result to the memory workspace and then calculates ... Here is part of the...
Read more >Hunting Java Memory Leaks - Toptal
For one, they put unnecessary pressure on your machine as your programs consume more and more resources. To make things worse, detecting these...
Read more >3 Troubleshoot Memory Leaks - Java - Oracle Help Center
To know more about the JFR commercial license, see the license agreement. The following sections show figures and describe how to debug a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@renesax14 There is no any version that mitigate this issue as I understood. It is on progress to solve !
@egrefen I’m facing this issue with the
higher
library when I am using the higher.path.make_functional function to make a forward pass through an LSTM model. How should I explicitly delete the backwards graph when I’m done with the inner and outer loop steps? As of now, the GPU consumption keeps increasing as more batches are processed.