# GPU memory consumption increases while training

**URL:** <https://discuss.pytorch.org/t/gpu-memory-consumption-increases-while-training/2770>\
**Category:** Uncategorized\
**Created:** [May 8, 2017, 4:58am UTC](https://discuss.pytorch.org/t/gpu-memory-consumption-increases-while-training/2770 "2017-05-08T04:58:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![apaszke](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/apaszke/32/21_2.png) [@apaszke](https://discuss.pytorch.org/u/apaszke)\
**Post date:** [May 8, 2017, 10:04am UTC](https://discuss.pytorch.org/t/gpu-memory-consumption-increases-while-training/2770/3 "2017-05-08T10:04:20Z")

</div>

If you add `del loss, output` at the end of the loop the memory usage will likely remain the same after the first iteration (what you see it probably a side-effect of Python’s scoping rules). It’s possible that cuDNN uses much less memory than the default backend.

---

_[View the full topic](https://discuss.pytorch.org/t/gpu-memory-consumption-increases-while-training/2770)._
