leezu commented on a change in pull request #20262:
URL: https://github.com/apache/incubator-mxnet/pull/20262#discussion_r649215340
##########
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:
`dc.clear` here is called on the copied symbol? Previously you mentioned
that the copied graph does not contain DCInfo. If so, `dc.clear` here would be
a no-op. If the copied symbol however contains `DCInfo`, then you could clear
it already before returning the symbol. WDYT?
--
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]