diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index cc05ec3297a0e6540f4196b24b270b61be54f3ff..6e03d582600db0399957fffdb6f2934624a5b6c0 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -6106,7 +6106,7 @@ class Program(object): for j in six.moves.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")