diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index adad9cfdc26671c9ef638ff61ff0d6ad57d47c9e..060f9a1a9190410a872a4d028b623d770a19f738 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(