leezu commented on a change in pull request #17623: Dynamic subgraph compile
support
URL: https://github.com/apache/incubator-mxnet/pull/17623#discussion_r388556154
##########
File path: python/mxnet/gluon/block.py
##########
@@ -1026,6 +1030,53 @@ def _call_cached_op(self, *args):
out = [out]
return _regroup(out, self._out_format)
+ def optimize_for(self, x, *args, backend=None, backend_opts=None,
**kwargs):
+ """Activates or deactivates :py:class:`HybridBlock` s recursively. Has
no effect on
+ non-hybrid children.
Review comment:
I think that's reasonable as a separate paragraph in the docstring. But it'd
be too confusing as a sentence summary. Maybe for the first sentence, you could
describe what optimize_for is used for. Ie. enable users to optimize for a
backend without doing an actual forward pass. The concept of CachedOp may not
be clear to users.
----------------------------------------------------------------
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]
With regards,
Apache Git Services