From 68ee7f731250664077be675aac49b358ee93ed78 Mon Sep 17 00:00:00 2001 From: wangchaochaohu Date: Tue, 17 Nov 2020 10:15:04 +0800 Subject: [PATCH] fix overwrite for gather OP of API2.0(#28659) --- 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 adad9cfdc2..060f9a1a91 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( -- GitLab