icemelon9 commented on a change in pull request #4287: [TF][Relay][Op] Pass
module when infer shape
URL: https://github.com/apache/incubator-tvm/pull/4287#discussion_r344421852
##########
File path: python/tvm/relay/frontend/common.py
##########
@@ -451,20 +451,27 @@ def get_name(node):
return name
-def infer_type(node):
+def infer_type(node, mod=None):
"""A method to infer the type of an intermediate node in the relay
graph."""
- mod = node if isinstance(node, _module.Module) else
_module.Module.from_expr(node)
+ if isinstance(mod, _module.Module):
+ mod["main"] = _expr.Function([], node)
Review comment:
Create a new module here instead of modifying the existing one?
----------------------------------------------------------------
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