From 77b1f39013acb0fec23b07881a680c6146dbb54b Mon Sep 17 00:00:00 2001 From: wangchaochaohu Date: Mon, 16 Nov 2020 12:37:34 +0000 Subject: [PATCH] refine --- python/paddle/tensor/manipulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index adad9cfdc26671..060f9a1a919041 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -786,7 +786,7 @@ def gather(x, index, axis=None, name=None): axis = 0 axis_tensor = axis if not isinstance(axis, Variable) and axis == 0: - return paddle.fluid.layers.gather(input=x, index=index, overwrite=True) + return paddle.fluid.layers.gather(input=x, index=index, overwrite=False) if not isinstance(axis, Variable): with device_guard("cpu"): axis_tensor = fill_constant(