未验证 提交 65d8d165 编写于 作者: W wangchaochaohu 提交者: GitHub

add decorator for deprecated Ops (#26373)

上级 0d1a62e9
...@@ -10327,6 +10327,7 @@ def expand_as(x, target_tensor, name=None): ...@@ -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'): ...@@ -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 ...@@ -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): ...@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册