Open lzfelix opened 6 years ago
Hello @lzfelix, can you say, what's gensim version you used before for training/saving of your model?t Also, if possible, please provide code that you used for training/saving.
Hi @menshikh-iv, a colleague of mine has trained the model, so I'm not completely sure about the details. I know that it was trained using word2vec C implementation from Google and then I converted it to gensim binary format using gensim 3.1.0.
@lzfelix thanks for the info
@menshikh-iv, sure! Anything that I can help!
related issue #2000
Thanks a lot, @menshikh-iv, I'll start tracking the other issue, which already has a pull request referencing it. Maybe you can close this issue for now just to keep things in one place.
PR with the fix - #2012, @lzfelix I'll close issues when a fix will be merged to develop
.
@menshikh-iv This issue may or may not be related to #2012. @lzfelix Can you please outline the steps to reproduce this issue? More specifically, provide the file/similar file that you are trying to load and the code using which you are loading the file. Thanks.
Hi @manneshiva, after loading a word2vec binary (details on this later), I get the following error message if I try to pre-compute vectors similarity with model.init_sims(replace=True)
or even retrieve a word-vector with model[word]
. Namely:
model = KeyedVectors.load(constants.DEFAULT_WORD2VEC_PATH)
model.init_sims(replace=True) # < error happens here
vector = model['banana'] # < or here if the previous line is not used.
Details on the model: This binary file was obtained from a model trained with Google's word2vec C code and then converted to Gensim format. Since it's being used for a private project, I might only be able to share the model with you through some private mean, ie: Google Drive link via e-mail.
@lzfelix please sent me a link to ivan@rare-technologies.com
(don't worry, we will not share your file).
HI @menshikh-iv, thank you. I have just sent the email.
@lzfelix reproduced, thanks! We'll fix it.
Great! Thanks a lot.
what if i want to update the model loaded with syntax (gensim.models.KeyedVectors.load_word2vec_format) by new sentences I tried : showing error
model.build_vocab(more_sentences, update=True) AttributeError: 'Word2VecKeyedVectors' object has no attribute 'build_vocab'
@rachhitgarg load_word2vec_format
returns only vectors (not full model), you can't continue training, see https://radimrehurek.com/gensim/models/keyedvectors.html
Any progress on this bug?
Not that I am aware of.
I have a word2vec model which I was able to load into Gensim, normalize and retrieve word vectors with
model.init_sims(replace=True)
andmodel[word]
previously. After updating to gensim 3.4.0 I'm receiving the following error messages for these operations:and
This seems related to the issues caused by the vector models re-implementation #1777, similarly to #1882 and #1952. Unfortunately I can't provide the binary file.
Thank you, Luiz Felix