Skip to content

Commit 586ac38

Browse files
committed
Fix the unknow func in ast renamer.
1 parent 42f21bd commit 586ac38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graph_net/sample_pass/ast_graph_variable_renamer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ def _clean_delete(self, stmt):
232232

233233
def _filter_delete_target(self, target):
234234
if isinstance(target, ast.Tuple): # del (a, b)
235-
kept_elts = [e for e in target.elts if not self._is_protected_var(e)]
235+
kept_elts = [e for e in target.elts if not self._is_input_or_weight_var(e)]
236236
return ast.Tuple(elts=kept_elts, ctx=ast.Del()) if kept_elts else None
237-
elif not self._is_protected_var(target): # del a
237+
elif not self._is_input_or_weight_var(target): # del a
238238
return target
239239
else:
240240
pass

0 commit comments

Comments
 (0)