junrushao commented on code in PR #16046:
URL: https://github.com/apache/tvm/pull/16046#discussion_r1381237398


##########
python/tvm/relax/frontend/nn/visitor.py:
##########
@@ -112,6 +113,14 @@ def visit(self, name: str, node: Any) -> Any:
         ret_node: Any
             The new node to replace current node.
         """
+
+        def _leaf_name(parent: str, child: str) -> str:
+            if parent == "":
+                # in the top level of the module
+                return child
+            else:
+                return f"{parent}.{child}"
+
         if isinstance(node, nn.ModuleList):
             for i in range(len(node)):
                 if isinstance(node[i], nn.ModuleList):

Review Comment:
   I think it's a reasonable design



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to