ryankiros / skip-thoughts

Sent2Vec encoder and training code from the paper "Skip-Thought Vectors"
2.05k stars 544 forks source link

DeprecationWarning: Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead. #54

Open dakshvar22 opened 7 years ago

dakshvar22 commented 7 years ago

We have changed the line to load model to gensim.models.KeyedVectors.load_word2vec_format, still we are getting the following error

import tools embed_map = tools.load_googlenews_vectors() model = tools.load_model(embed_map)

DeprecationWarning Traceback (most recent call last)

in () 1 import tools ----> 2 embed_map = tools.load_googlenews_vectors() 3 model = tools.load_model(embed_map) /home/mpl2/daksh/tarun/skip-thoughts/training/tools.pyc in load_googlenews_vectors() 154 155 embed_map = gensim.models.KeyedVectors.load_word2vec_format(path_to_word2vec, binary=True) --> 156 return embed_map 157 158 def lookup_table(options, embed_map, worddict, word_idict, f_emb, use_norm=False): /usr/local/lib/python2.7/dist-packages/gensim/models/word2vec.pyc in load_word2vec_format(cls, fname, fvocab, binary, encoding, unicode_errors, limit, datatype) 1446 limit=None, datatype=REAL): 1447 """Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.""" -> 1448 raise DeprecationWarning("Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.") 1449 1450 def save_word2vec_format(self, fname, fvocab=None, binary=False): DeprecationWarning: Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.
aayushsanghavi commented 6 years ago

I faced the same problem and I fixed it in the following way -

naspuka commented 5 years ago

The path_to_word to bed is returning error no file exist why