leezu commented on a change in pull request #20262:
URL: https://github.com/apache/incubator-mxnet/pull/20262#discussion_r649398323
##########
File path: python/mxnet/gluon/block.py
##########
@@ -1088,6 +1088,7 @@ def _get_graph(self, *args):
out = super().__call__(*args)
flatten_out, self._out_format = _flatten(out, "output")
symbol_outputs = dc.get_symbol(flatten_out,
sym_cls=type(symbol_inputs[0]))
+ dc.clear(flatten_out)
Review comment:
Sorry I misread the flatten_out as symbol_outputs. "so I try to clear
DCInfo from ndarray outputs" still shouldn't be needed and garbage collection
of the ndarray should clear the entry. So it would still be helpful to point
out the temporary nature of the clear call
--
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]