未验证 提交 fac6a5f0 编写于 作者: W WangZhen 提交者: GitHub

Process sub-node in tensor_shape_transformer (#43998)

上级 cf8d42bb
...@@ -37,6 +37,7 @@ class TensorShapeTransformer(gast.NodeTransformer): ...@@ -37,6 +37,7 @@ class TensorShapeTransformer(gast.NodeTransformer):
self.visit(self.root) self.visit(self.root)
def visit_Attribute(self, node): def visit_Attribute(self, node):
self.generic_visit(node)
if node.attr == 'shape': if node.attr == 'shape':
args = ast_to_source_code(node.value).strip() args = ast_to_source_code(node.value).strip()
# NOTE(dev): we can deal with paddle.shape in this case, but it's # NOTE(dev): we can deal with paddle.shape in this case, but it's
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册