Skip to content

Commit

Permalink
Fix variable naming in TensorDatasetMatcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
txyugood committed Jul 5, 2023
1 parent 5323537 commit 0a065c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paconvert/api_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3650,11 +3650,11 @@ def generate_code(self, kwargs):
class TensorDatasetMatcher(BaseMatcher):
def get_paddle_nodes(self, args, kwargs):
new_args = self.parse_args(args)
code = "[{}".format(new_args[0])
tensors_v = "[{}".format(new_args[0])
for arg in new_args[1:]:
code += ", {}".format(arg)
code += "]"
code = "{}({})".format(self.get_paddle_api(), code)
tensors_v += ", {}".format(arg)
tensors_v += "]"
code = "{}({})".format(self.get_paddle_api(), tensors_v)
node = ast.parse(code.strip("\n")).body
return node

Expand Down

0 comments on commit 0a065c9

Please sign in to comment.