squidszyd opened a new issue #9451: How to dynamically bind executor with 
variable symbol?
URL: https://github.com/apache/incubator-mxnet/issues/9451
 
 
   During testing phase, my symbol's computing structure depends on input 
shape. E.g, when input shape is K, then there is N(K) layers of Convolution 
(for example), where N(K) changes with K.
   Thus, I have to construct a new symbol and rebind it with an executor when K 
changes. Code may look like this:
   ```
   if current_k != last_k:
       sym = get_symbol(current_k)
       mod = mx.mod.Module(sym, ...)
       mod.bind(...)
   else:
       # keep the module unchanged
       pass
   ```
   My question is, how to effectively release memory allocated by the bound 
module and rebind it with a different symbol?
   I've tried using python's 'del' to delete the bound module, but the memory 
is not released when look into the info returned by 'nvidia-smi'.

----------------------------------------------------------------
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