未验证 提交 68ee7f73 编写于 作者: W wangchaochaohu 提交者: GitHub

fix overwrite for gather OP of API2.0(#28659)

上级 65aac811
......@@ -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(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册