From 24f24cad1d60b59f8b110d83146fd72beccc77c4 Mon Sep 17 00:00:00 2001 From: phlrain Date: Tue, 13 Dec 2022 14:38:42 +0000 Subject: [PATCH] update --- python/paddle/nn/layer/rnn.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/paddle/nn/layer/rnn.py b/python/paddle/nn/layer/rnn.py index bbe0f0c4760b7..9b44ca0da927b 100644 --- a/python/paddle/nn/layer/rnn.py +++ b/python/paddle/nn/layer/rnn.py @@ -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,