szha commented on issue #9343: memory leakage ?
URL: 
https://github.com/apache/incubator-mxnet/issues/9343#issuecomment-355907094
 
 
   The problem is that in your inference loop there was no blocking operator, 
which means the next iteration will start before the current iteration 
finishes. Since the execution for operators are asynchronous, the unfinished 
operators would accumulate, which results in ever-increasing memory usage.
   
   The quickest fix is to print the loss as well in the inner loop. Because the 
loss is an ndarray, its `__str__` requires `asnumpy` call, which is blocking. 
This ensures that one iteration finishes before next could start.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to