-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Word2Vec' object has no attribute 'infer_vector' #18
Comments
Looks like it's probably not reading from my forked version of gensim. Can you test if you can call infer_test manually with an interactive python session? |
Thank you for the prompt reply! What do you mean by calling I've tried doing the following:
Which generates the same issue. |
Could it be to do with dependencies of Gensim?
|
Weird, I just tried doing a fresh install (with virtualenv) and have no problems. Your gensim version seems to be right too (0.12.4), so I am not sure why this is happening. Can you try create a new virtualenv, install gensim like you did before and try again? |
So I deleted the env, and run the following:
And is still outputs:
|
Does the train script (train_model.py) work? |
Looks to be working fine:
|
Yea this really beats me. The train_model.py loads pre-trained embeddings and it won't work if you use the canonical gensim, so it looks like your gensim version is right but somehow it doesn't see infer_vector... |
Any fix on this yet ? We are facing a similar issue. |
I am facing this same issue with doc2vec. My code run fine on Google Cloab, but getting an error while running locally on my own system. |
Did anyone solve this?
Pip freeze:
|
Running and saving my own model with |
I've cloned the repo, downloaded the pre-trained Wikipedia model, and installed Gensim via
pip install git+https://github.com/jhlau/gensim
.Then I pasted the downloaded model files into the
toy_data
directory and changed the model line in the file to:model="toy_data/word2vec.bin"
.However, when I run
infer_test.py
I get the following error:The text was updated successfully, but these errors were encountered: