Skip to content

Commit 58c47e8

Browse files
authored
[Cherry-pick][BugFix]Fix set_attr modify underly type (#47500) (#47566)
* Fix set_attr modify underly type (#47500) * reformat code * Revert "reformat code" This reverts commit f11a5d7.
1 parent 7145db6 commit 58c47e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6106,7 +6106,7 @@ def _inference_optimize(self, prune_read_op=True):
61066106
for j in six.moves.range(block.op_size()):
61076107
op = block.op(j)
61086108
if op.has_attr('is_test'):
6109-
op._set_attr('is_test', True)
6109+
op._set_bool_attr('is_test', True)
61106110
if op.type() == "batch_norm":
61116111
# Remove the output ReserveSpace of batch_norm if exists.
61126112
op.remove_output("ReserveSpace")

0 commit comments

Comments
 (0)