# Memory usage increasing with each epoch

**URL:** <https://discourse.julialang.org/t/memory-usage-increasing-with-each-epoch/121798>\
**Category:** Machine Learning\
**Tags:** cuda, flux\
**Created:** [October 26, 2024, 9:45pm UTC](https://discourse.julialang.org/t/memory-usage-increasing-with-each-epoch/121798 "2024-10-26T21:45:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![CarloLucibello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carlolucibello/32/3278_2.png) [@CarloLucibello](https://discourse.julialang.org/u/CarloLucibello)\
**Post date:** [November 5, 2024, 4:16pm UTC](https://discourse.julialang.org/t/memory-usage-increasing-with-each-epoch/121798/5 "2024-11-05T16:16:33Z")

</div>

setting environment variables like this

```julia
ENV["JULIA_CUDA_HARD_MEMORY_LIMIT"] = "3.0GiB"

```

or

```julia
ENV["JULIA_CUDA_SOFT_MEMORY_LIMIT"] = "3.0GiB"

```

can mitigate the issue

---

_[View the full topic](https://discourse.julialang.org/t/memory-usage-increasing-with-each-epoch/121798)._
