bearsroom edited a comment on issue #15218: memory leak of ImageRecordIter ? URL: https://github.com/apache/incubator-mxnet/issues/15218#issuecomment-507035065 Hello there, I also encountered this memory leak problem with large number of .rec files. Somehow I managed to bypass this problem by setting the prefetching parameter `prefetch_buffer=1`. It seems that the memory leak problem may be caused by the `recycle_queue_` in `ImageRecordIter2`, but I'm not sure about that. I've tested different values of `prefetch_buffer`, from 1 to 8, and I observed that as the `prefetch_buffer` increases, the amount of leaked memory also increases. You can see here for the behavior of `recylcle_queue_` during dataset iteration: https://github.com/apache/incubator-mxnet/blob/621b391c1445b9abba7f226abcbc55ab6aee5a0c/src/io/iter_image_recordio_2.cc#L737
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
