From 54422078e06b5a662a0b407f7008b5f95ef8fc79 Mon Sep 17 00:00:00 2001 From: xiaoguoguo626807 <100397923+xiaoguoguo626807@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:20:29 +0800 Subject: [PATCH] modify ir_grad (#57449) --- python/paddle/autograd/ir_backward.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/autograd/ir_backward.py b/python/paddle/autograd/ir_backward.py index ab719bab241ad..876072e48b8ba 100644 --- a/python/paddle/autograd/ir_backward.py +++ b/python/paddle/autograd/ir_backward.py @@ -528,8 +528,8 @@ def update_input_grad_map(op, input_grads): ] = state.value_to_valuegrad[value] else: state.op_to_opgrad[op] = [] - else: - state.op_to_opgrad[op] = [] + else: + state.op_to_opgrad[op] = [] def create_backward_prune_set(inputs, outputs, no_grad_set, state):