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

musl/fix_failed_unittests_in_musl
wangchaochaohu 5 years ago committed by GitHub
parent 65aac81191
commit 68ee7f7312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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(

Loading…
Cancel
Save