From f381703e80efabbcd1c43fd915ee7a2d003935f3 Mon Sep 17 00:00:00 2001 From: xuyige Date: Mon, 19 Aug 2019 20:48:30 +0800 Subject: [PATCH] export TokenEmbedding. --- fastNLP/embeddings/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fastNLP/embeddings/__init__.py b/fastNLP/embeddings/__init__.py index 4f90ac63..37881f17 100644 --- a/fastNLP/embeddings/__init__.py +++ b/fastNLP/embeddings/__init__.py @@ -7,6 +7,7 @@ torch.FloatTensor。所有的embedding都可以使用 `self.num_embedding` 获 __all__ = [ "Embedding", + "TokenEmbedding", "StaticEmbedding", "ElmoEmbedding", "BertEmbedding", @@ -14,14 +15,14 @@ __all__ = [ "StackEmbedding", "LSTMCharEmbedding", "CNNCharEmbedding", - "get_embeddings" + "get_embeddings", ] -from .embedding import Embedding +from .embedding import Embedding, TokenEmbedding from .static_embedding import StaticEmbedding from .elmo_embedding import ElmoEmbedding from .bert_embedding import BertEmbedding, BertWordPieceEncoder from .char_embedding import CNNCharEmbedding, LSTMCharEmbedding from .stack_embedding import StackEmbedding -from .utils import get_embeddings \ No newline at end of file +from .utils import get_embeddings