Created
May 19, 2018 18:36
-
-
Save aswalin/c99f80a6fe6963d9698e26d844200d33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
infersent = torch.load('InferSent/encoder/infersent.allnli.pickle', map_location=lambda storage, loc: storage) | |
infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt") | |
infersent.build_vocab(sentences, tokenize=True) | |
dict_embeddings = {} | |
for i in range(len(sentences)): | |
print(i) | |
dict_embeddings[sentences[i]] = infersent.encode([sentences[i]], tokenize=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kindly help me in finding "infersent.allnli.pickle".
Searched a lot on this but, nothing worked.......
Thanks in advance...!!!