From 1f3d16adcae20e6b95505b9eb8c3269ab4ee20ef Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 24 Aug 2022 05:27:21 -0500 Subject: [PATCH] remove needless axis argument (#45366) --- python/paddle/tensor/math.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index 0c23240cdc..8c15f8633a 100644 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -4484,7 +4484,7 @@ def diff(x, n=1, axis=-1, prepend=None, append=None, name=None): if x.dtype == paddle.bool: return _C_ops.final_state_logical_xor(input_back, input_front) else: - return elementwise_sub(input_back, input_front, axis=axis) + return _C_ops.final_state_subtract(input_back, input_front) elif _in_legacy_dygraph(): has_pend = False input_list = [] -- GitLab