You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/08 08:32:06 UTC

[GitHub] szha commented on issue #9343: memory leakage ?

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:
users@infra.apache.org


With regards,
Apache Git Services