From 00b50faa8626f51ffdafc74721846bbd4a3793d8 Mon Sep 17 00:00:00 2001 From: yukavio Date: Thu, 13 Aug 2020 15:04:02 +0800 Subject: [PATCH] fix old op --- python/paddle/fluid/input.py | 2 +- python/paddle/fluid/layers/nn.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/input.py b/python/paddle/fluid/input.py index f0c19e9c746..15a3022f932 100644 --- a/python/paddle/fluid/input.py +++ b/python/paddle/fluid/input.py @@ -22,7 +22,7 @@ from ..utils import deprecated __all__ = ['one_hot', 'embedding'] -@deprecated(since='2.0.0', update_to='paddle.functional.one_hot') +@deprecated(since='2.0.0', update_to='paddle.nn.functional.one_hot') def one_hot(input, depth, allow_out_of_range=False): """ :alias_main: paddle.nn.functional.one_hot diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index a91317b2f44..9461d87bf1c 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -5832,7 +5832,7 @@ def smooth_l1(x, y, inside_weight=None, outside_weight=None, sigma=None): return loss -@deprecated(since='2.0.0', update_to='paddle.functional.one_hot') +@deprecated(since='2.0.0', update_to='paddle.nn.functional.one_hot') def one_hot(input, depth, allow_out_of_range=False): """ -- GitLab