skip-thoughts
skip-thoughts copied to clipboard
DeprecationWarning: Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.
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)
/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.
I faced the same problem and I fixed it in the following way -
- The import statement
import gensim.models.keyedvectors as word2vec
- In load_googlenews_vectors method
embed_map = word2vec.KeyedVectors.load_word2vec_format(path_to_word2vec, binary=True)
The path_to_word to bed is returning error no file exist why