From c52b6bbfa9b1f9c99a425c53b711cacc71e23243 Mon Sep 17 00:00:00 2001 From: Feiyu Chan Date: Sat, 10 Oct 2020 09:55:20 +0800 Subject: [PATCH] add alias for RNN APIs from paddle.nn.layer.rnn explicitly (#27784) --- python/paddle/nn/__init__.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/python/paddle/nn/__init__.py b/python/paddle/nn/__init__.py index 427a2f91c96..b1acea2ba5f 100644 --- a/python/paddle/nn/__init__.py +++ b/python/paddle/nn/__init__.py @@ -148,10 +148,17 @@ from .layer.norm import InstanceNorm3d #DEFINE_ALIAS from .layer.norm import BatchNorm1d #DEFINE_ALIAS from .layer.norm import BatchNorm2d #DEFINE_ALIAS from .layer.norm import BatchNorm3d #DEFINE_ALIAS -from .layer.rnn import * -# from .layer.rnn import RNNCell #DEFINE_ALIAS -# from .layer.rnn import GRUCell #DEFINE_ALIAS -# from .layer.rnn import LSTMCell #DEFINE_ALIAS + +from .layer.rnn import RNNCellBase #DEFINE_ALIAS +from .layer.rnn import SimpleRNNCell #DEFINE_ALIAS +from .layer.rnn import LSTMCell #DEFINE_ALIAS +from .layer.rnn import GRUCell #DEFINE_ALIAS +from .layer.rnn import RNN #DEFINE_ALIAS +from .layer.rnn import BiRNN #DEFINE_ALIAS +from .layer.rnn import SimpleRNN #DEFINE_ALIAS +from .layer.rnn import LSTM #DEFINE_ALIAS +from .layer.rnn import GRU #DEFINE_ALIAS + from .layer.transformer import MultiHeadAttention from .layer.transformer import TransformerEncoderLayer from .layer.transformer import TransformerEncoder -- GitLab