Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
phlrain committed Dec 13, 2022
1 parent 149ba2e commit 24f24ca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/paddle/nn/layer/rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,7 @@ def _switch_grad(x, stop=False):

with paddle.fluid.framework.device_guard("cpu"):

start_i = paddle.fluid.layers.increment(
x=start_i, value=1, in_place=True
)
start_i = paddle.tensor.increment(x=start_i, value=1)
map_structure(
lambda x, y: paddle.tensor.array_write(x, start_i, y),
new_states,
Expand Down

0 comments on commit 24f24ca

Please sign in to comment.