Browse Source

mirror fix (#361)

tags/v1.0.0alpha
LouChao98 GitHub 3 years ago
parent
commit
595fc1d455
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/embeddings/static_embedding.py

+ 1
- 1
fastNLP/embeddings/static_embedding.py View File

@@ -170,7 +170,7 @@ class StaticEmbedding(TokenEmbedding):
if model_path:
embedding = self._load_with_vocab(model_path, vocab=lowered_vocab, init_method=init_method)
else:
embedding = self._randomly_init_embed(len(vocab), embedding_dim, init_method)
embedding = self._randomly_init_embed(len(lowered_vocab), embedding_dim, init_method)
self.register_buffer('words_to_words', torch.arange(len(vocab)).long())
if lowered_vocab.unknown:
unknown_idx = lowered_vocab.unknown_idx


Loading…
Cancel
Save