diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 37645ef4ab326452d305ad4eeec42fa86214941c..4d8e356d63d8c482da3523f5a75205d48dac0e01 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")