未验证 提交 aa02e347 编写于 作者: G Guo Sheng 提交者: GitHub

Add hapi.text and corresponding unit test. (#24457)

* Add hapi.text and corresponding unit test.
test=develop

* Remove hapi.text apis' reuse parameter args for coverage.
test=develop

* Fix TransformerCell and TransformerBeamSearchDecoder example codes.
test=develop

* Fix example codes in hapi.text.
test=develop

* Add some apis in hapi.text into example code white list.
test=develop

* Fix example code of DynamicDecode in hapi.text.
text=develop

* Rename Model.self as model in test_text.py
test=develop
上级 526a2117
...@@ -22,6 +22,7 @@ from . import loss ...@@ -22,6 +22,7 @@ from . import loss
from . import datasets from . import datasets
from . import distributed from . import distributed
from . import vision from . import vision
from . import text
logger.setup_logger() logger.setup_logger()
...@@ -33,6 +34,7 @@ __all__ = [ ...@@ -33,6 +34,7 @@ __all__ = [
'metrics', 'metrics',
'loss', 'loss',
'vision', 'vision',
'text',
] ]
__all__ += model.__all__ __all__ += model.__all__
此差异已折叠。
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from . import text
from .text import *
__all__ = text.__all__
此差异已折叠。
...@@ -183,6 +183,7 @@ packages=['paddle', ...@@ -183,6 +183,7 @@ packages=['paddle',
'paddle.incubate.hapi.vision', 'paddle.incubate.hapi.vision',
'paddle.incubate.hapi.vision.models', 'paddle.incubate.hapi.vision.models',
'paddle.incubate.hapi.vision.transforms', 'paddle.incubate.hapi.vision.transforms',
'paddle.incubate.hapi.text',
'paddle.io', 'paddle.io',
'paddle.nn', 'paddle.nn',
'paddle.nn.functional', 'paddle.nn.functional',
......
...@@ -334,6 +334,34 @@ ...@@ -334,6 +334,34 @@
"ParallelEnv", "ParallelEnv",
"DataParallel", "DataParallel",
"DataParallel.scale_loss", "DataParallel.scale_loss",
"DataParallel.apply_collective_grads" "DataParallel.apply_collective_grads",
"BasicLSTMCell.forward",
"BasicGRUCell.forward",
"RNN.forward",
"StackedRNNCell.forward",
"StackedLSTMCell.forward",
"LSTM.forward",
"BidirectionalRNN.forward",
"BidirectionalLSTM.forward",
"StackedGRUCell.forward",
"GRU.forward",
"BidirectionalGRU.forward",
"DynamicDecode.forward",
"Conv1dPoolLayer.forward",
"CNNEncoder.forward",
"TransformerCell.forward",
"TransformerBeamSearchDecoder.step",
"MultiHeadAttention.forward",
"MultiHeadAttention.cal_kv",
"FFN.forward",
"TransformerEncoderLayer.forward",
"TransformerEncoder.forward",
"TransformerDecoderLayer.forward",
"TransformerDecoder.forward",
"TransformerDecoder.prepare_static_cache",
"TransformerDecoder.prepare_incremental_cache",
"LinearChainCRF.forward",
"CRFDecoding.forward",
"SequenceTagging.forward"
] ]
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册