add deprecated decorator, remove alias for cumsum op (#26104)

add deprecated decorator, remove alias for cumsum op
revert-24895-update_cub
LutaoChu 5 years ago committed by GitHub
parent 65b97d6215
commit b6d14d9d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,6 +18,7 @@ from .layer_function_generator import generate_layer_fn, generate_activation_fn,
from .. import core
from ..framework import convert_np_dtype_to_dtype_, Variable
from ..data_feeder import convert_dtype, check_variable_and_dtype, check_type, check_dtype
from paddle.utils import deprecated
__activations_noattr__ = [
'sigmoid',
@ -502,6 +503,10 @@ __all__ += ['cumsum']
_cum_sum_ = generate_layer_fn('cumsum')
@deprecated(
since="2.0.0",
update_to="paddle.cumsum",
reason="New APIs for Paddle 2.0 are coming.")
def cumsum(x, axis=None, exclusive=None, reverse=None):
check_type(x, 'x', (Variable), 'cumsum')
locals_var = locals().copy()

@ -1546,9 +1546,6 @@ ${comment}
def cumsum(x, axis=None, dtype=None, name=None):
"""
:alias_main: paddle.cumsum
:alias: paddle.cumsum,paddle.tensor.cumsum,paddle.tensor.math.cumsum
The cumulative sum of the elements along a given axis. The first element of the result is the same of the first element of the input.
Args:

Loading…
Cancel
Save