From e6a6b0fc088f03a518670e14b9e025fcdd39db41 Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Tue, 1 Nov 2022 13:43:30 +0800 Subject: [PATCH] Fix set_attr modify underly type (#47500) --- python/paddle/fluid/framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 37645ef4ab..4d8e356d63 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -6100,7 +6100,7 @@ class Program(object): for j in range(block.op_size()): op = block.op(j) if op.has_attr('is_test'): - op._set_attr('is_test', True) + op._set_bool_attr('is_test', True) if op.type() == "batch_norm": # Remove the output ReserveSpace of batch_norm if exists. op.remove_output("ReserveSpace") -- GitLab