Skip to content

Commit 276c821

Browse files
authored
fix typo yield (PaddlePaddle#76413)
1 parent 0632bf5 commit 276c821

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/paddle/autograd/backward_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ def update_while_output_stopgradient(while_op, yield_op):
765765
while_op.result(i - 1).stop_gradient = False
766766

767767

768-
def find_index_of_yiled(value, yield_op):
768+
def find_index_of_yield(value, yield_op):
769769
for i, v in enumerate(yield_op.operands_source()):
770770
if v.is_same(value):
771771
return i
@@ -783,7 +783,7 @@ def update_tuple_pop_origin_inputs(tuple_pop_outputs):
783783
for input in tuple_push_inputs:
784784
if input.first_use().owner().name() == "cf.yield":
785785
yield_op = input.first_use().owner()
786-
index = find_index_of_yiled(input, yield_op)
786+
index = find_index_of_yield(input, yield_op)
787787
assert index != -1
788788
tuple_push_inputs_with_if.append(
789789
yield_op.get_parent_block().parent_op.result(index)

0 commit comments

Comments
 (0)