From 379ea69bb679db5ac0f2401dfef7bbfa454609d8 Mon Sep 17 00:00:00 2001 From: BaiJun Date: Thu, 13 Aug 2020 09:53:26 +0800 Subject: [PATCH] Add a trick for StaticEmbedding --- fastNLP/embeddings/static_embedding.py | 42 ++++++++++++++++++-------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/fastNLP/embeddings/static_embedding.py b/fastNLP/embeddings/static_embedding.py index ef40f30d..376edf68 100644 --- a/fastNLP/embeddings/static_embedding.py +++ b/fastNLP/embeddings/static_embedding.py @@ -260,12 +260,8 @@ def _load_with_vocab(self, embed_filepath, vocab, dtype=np.float32, padding='