-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
size confusion when loading custom vectors #544
Comments
I need to update the docs — this was indeed broken at the 1.0 release (actually the GloVe loading was also broken). Can you try again with v1.0.5, using the keyword |
Sure thing. But, I'm sorry, I'm a bit unclear. I'm not sure what command to use and where So I tried to load vectors from a text file in
So now it appears that the vectors did not get loaded in as the vector for "this" didn't change. Then I tried
Same result. If I misunderstood what you wanted me to try, please clarify and I'll happily test it out. |
Sorry, I meant like this: nlp2 = English(add_vectors=lambda vocab: vocab.load_vectors("/Users/mcapizzi/Github/nlp-pipeline/jupyter_notebooks/data/sample_w2v.txt")) |
Got it. Unfortunately, a new error (again, I'm in
And it does the same thing when trying to load a
|
Hmm. Thanks for your patience. |
I really should've slowed down and tested this more carefully — I'm trying to do too many things at once. I've added a method If you want to try this out, you can do: pip install cython==0.23
pip install cymem thinc preshed
pip install https://github.com/explosion/spaCy/archive/master.zip |
This should be fixed in 1.1.0. Please reopen if it's not! |
Thanks @honnibal . It indeed works in One clarification for anyone who may be having trouble: the argument to
This is clear in the source code and documentation, but could be easily overlooked. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a follow up to this issue which still persists.
I am not confident that
spacy
is housing my vectors after loading.First of all, I have created a
bin
of my vectors usingvocab.write_binary_vectors()
. They are 200-dimensions, but after successfully loading them into my existing instance ofEnglish()
, they still appear to be 300-dimensions.The weirdest thing, though, is that these vectors are not the "original" vectors loaded by
spacy
(GloVe 200-dimensions
):So this vector is different from the "original", preloaded vector for "this", but it's still 300 dimensions.
The same thing happens if I use
vocab.load_vectors()
instead ofvocab.load_vectors_from_bin_loc()
:At least, however, they are the same as the vectors that were loaded from the
bin
file:The text was updated successfully, but these errors were encountered: