[Parser] Typo in mod creation (#6165)
authorAnimesh Jain <anijain@umich.edu>
Wed, 29 Jul 2020 15:56:23 +0000 (08:56 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2020 15:56:23 +0000 (08:56 -0700)
python/tvm/relay/frontend/common.py

index 6310e3b..c3da195 100644 (file)
@@ -457,7 +457,7 @@ def get_name(node):
 def infer_type(node, mod=None):
     """A method to infer the type of an intermediate node in the relay graph."""
     if isinstance(mod, IRModule):
-        mod["main"] = _function.Function([], node)
+        mod["main"] = _function.Function(tvm.relay.analysis.free_vars(node), node)
         mod = _transform.InferType()(mod)
         entry = mod["main"]
         ret = entry.body