epfml / sent2vec

General purpose unsupervised sentence representations
Other
1.19k stars 256 forks source link

Error run get_sentence_embeddings_from_pre-trained_models #65

Closed hoi-nx closed 5 years ago

hoi-nx commented 5 years ago

I run get_sentence_embeddings_from_pre-trained_models but result my_embeddings.shape is (0,)

mpagli commented 5 years ago

Did you try using the python wrapper instead?

hoi-nx commented 5 years ago
Screen Shot 2019-04-01 at 7 36 58 PM

I used to 16GB (700dim, trained on english wikipedia) but it not working. Can you help me ??

mpagli commented 5 years ago

Did you link the models correctly?

MODEL_WIKI_UNIGRAMS = os.path.abspath("./sent2vec_wiki_unigrams")
MODEL_WIKI_BIGRAMS = os.path.abspath("./sent2vec_wiki_bigrams")
hoi-nx commented 5 years ago
Screen Shot 2019-04-05 at 2 24 54 PM

I checked it and it was completely correct. (wiki_bigrams 16gb).

mpagli commented 5 years ago

Did you try to use the Python wrapper? I'll try to see this weekend if I can fix the notebook, but the Cython wrapper should be the default solution unless you're on Windows or Mac

kionfukuda commented 5 years ago

I had a similar error. The embeddings created was empty.

Traceback (most recent call last): File "main.py", line 145, in my_embeddings = get_sentence_embeddings(sentences, ngram='bigrams', model='twitter') File "main.py", line 134, in get_sentence_embeddings MODEL_TWITTER_BIGRAMS, FASTTEXT_EXEC_PATH) File "main.py", line 73, in get_embeddings_for_preprocessed_sentences assert(len(sentences) == len(embeddings)) AssertionError

guozhiqi14 commented 5 years ago

I had the same empty embedding error