It seems the standard way to read data and feed it to a model is through the use of the data loader iterators in a loop, for example using the enumerate construct. For each iteration of this loop a single batch is loaded and then processed. I would expect the memory load of such a loop to be constant over time. Instead I observe a linear increase as if all batches are kept in memory. After a few batches I run out of memory. I suspect this behavior is due to circular references, so I tried to manually invoke the garbage collector to no avail. Has anybody run into this sort of issues?