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
release/2.0-alpha
Guo Sheng 5 years ago committed by GitHub
parent 526a211774
commit aa02e347bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,6 +22,7 @@ from . import loss
from . import datasets
from . import distributed
from . import vision
from . import text
logger.setup_logger()
@ -33,6 +34,7 @@ __all__ = [
'metrics',
'loss',
'vision',
'text',
]
__all__ += model.__all__

File diff suppressed because it is too large Load Diff

@ -0,0 +1,18 @@
# 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__

File diff suppressed because it is too large Load Diff

@ -183,6 +183,7 @@ packages=['paddle',
'paddle.incubate.hapi.vision',
'paddle.incubate.hapi.vision.models',
'paddle.incubate.hapi.vision.transforms',
'paddle.incubate.hapi.text',
'paddle.io',
'paddle.nn',
'paddle.nn.functional',

@ -334,6 +334,34 @@
"ParallelEnv",
"DataParallel",
"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"
]
}

Loading…
Cancel
Save