diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index adde9cbd19..760f5ce58b 100755 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -8311,7 +8311,7 @@ def gather(input, index, overwrite=True): output = fluid.layers.gather(x, index) """ if in_dygraph_mode(): - return core.ops.gather(input, index, None) + return core.ops.gather(input, index, None, 'overwrite', overwrite) check_variable_and_dtype( input, 'x',