Skip to content
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

ValueError: could not broadcast input array from shape (384) into shape (300) #20

Open
MILOTIDE opened this issue Jul 30, 2018 · 2 comments

Comments

@MILOTIDE
Copy link

Hello,I want to use the demo ,but when I asked a question like"what is in the image",it errors:
'Unknown image ID. Try uploading the image again.'
OR
ValueError: could not broadcast input array from shape (384) into shape (300)
I don't know what does the image ID mean? How can I solve this problem?Thanks.Waiting for your reply.

@shjung13
Copy link

I also have the same issue. I think it's because of spacy.load('en', vectors=en_glove_cc_300_1m_vectors')
With the latest spacy, it doesn't have en_glove_cc_300_1m_vectors(300 dim) and only have en_core_web_sm which has 384 dim word vectors(i'm not sure about this).
Is there a way to download and apply en_glove_cc_300_1m_vectors?

@shjung13
Copy link

shjung13 commented Aug 5, 2018

@MILOTIDE I figured out the second issue by installing spacy version 1.6.0. After installing spacy, execute spacy.util.get_data_path() to make sure your word vector archive directory and download en-1.1.0.tar.gz and en_glove_cc_300_1m_vectors.tar.gz manually from here (https://github.com/explosion/spaCy/releases/tag/v1.6.0).
And untar the files in your archive path. This worked for me.

ps. You should delete .tar.gz files from archive dir, unless spacy cannot load vectors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants