Skip to content

Commit

Permalink
[Cherry-pick][BugFix]Fix set_attr modify underly type (#47500) (#47566)
Browse files Browse the repository at this point in the history
* Fix set_attr modify underly type (#47500)

* reformat code

* Revert "reformat code"

This reverts commit f11a5d7.
  • Loading branch information
Aurelius84 authored Nov 7, 2022
1 parent 7145db6 commit 58c47e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/fluid/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -6106,7 +6106,7 @@ def _inference_optimize(self, prune_read_op=True):
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")
Expand Down

0 comments on commit 58c47e8

Please sign in to comment.