add decorator for deprecated Ops (#26373)

test_feature_precision_test_c
wangchaochaohu 5 years ago committed by GitHub
parent 0d1a62e908
commit 65d8d16516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10327,6 +10327,7 @@ def expand_as(x, target_tensor, name=None):
from paddle.fluid.framework import convert_np_dtype_to_dtype_ from paddle.fluid.framework import convert_np_dtype_to_dtype_
@deprecated(since='1.8.0', update_to="paddle.uniform")
@templatedoc() @templatedoc()
def uniform_random_batch_size_like(input, def uniform_random_batch_size_like(input,
shape, shape,
@ -10596,6 +10597,7 @@ def sampling_id(x, min=0.0, max=1.0, seed=0, dtype='float32'):
return out return out
@deprecated(since='1.8.0', update_to="paddle.normal")
@templatedoc() @templatedoc()
def gaussian_random_batch_size_like(input, def gaussian_random_batch_size_like(input,
shape, shape,

@ -26,6 +26,7 @@ from .. import core
from .layer_function_generator import templatedoc from .layer_function_generator import templatedoc
from . import utils from . import utils
from ..data_feeder import check_variable_and_dtype, check_type, check_dtype, convert_dtype from ..data_feeder import check_variable_and_dtype, check_type, check_dtype, convert_dtype
from paddle.utils import deprecated
import numpy import numpy
import warnings import warnings
@ -746,6 +747,7 @@ def fill_constant(shape, dtype, value, force_cpu=False, out=None, name=None):
return out return out
@deprecated(since='1.8.0', update_to="paddle.fill_constant")
@templatedoc() @templatedoc()
def fill_constant_batch_size_like(input, def fill_constant_batch_size_like(input,
shape, shape,

Loading…
Cancel
Save