From fac6a5f015babb5979d3f9cb38767d90f19a7fc3 Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Fri, 1 Jul 2022 14:06:05 +0800 Subject: [PATCH] Process sub-node in tensor_shape_transformer (#43998) --- .../fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py b/python/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py index b7a2087d1f2..5604a634a17 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py @@ -37,6 +37,7 @@ class TensorShapeTransformer(gast.NodeTransformer): self.visit(self.root) def visit_Attribute(self, node): + self.generic_visit(node) if node.attr == 'shape': args = ast_to_source_code(node.value).strip() # NOTE(dev): we can deal with paddle.shape in this case, but it's -- GitLab