Browse Source

add assert in test_elmo_embedding

tags/v0.4.10
Yige Xu 5 years ago
parent
commit
f22991698a
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      test/embeddings/test_elmo_embedding.py

+ 1
- 0
test/embeddings/test_elmo_embedding.py View File

@@ -25,6 +25,7 @@ class TestRunElmo(unittest.TestCase):
words = torch.LongTensor([[0, 1, 2]])
hidden = elmo_embed(words)
print(hidden.size())
self.assertEqual(hidden.size(), (1, 3, elmo_embed.embedding_dim))

def test_elmo_embedding_layer_assertion(self):
vocab = Vocabulary().add_word_lst("This is a test .".split())


Loading…
Cancel
Save