Comments (10)
Issue is because Spacy updated the pretrained word embeddings model. Do the following to fix the issue.
- On the terminal
python -m spacy download en_vectors_web_lg
- In the code (demo.py), change the line
word_embeddings = spacy.load('en', vectors='en_glove_cc_300_1m_vectors')
to
word_embeddings = spacy.load('en_vectors_web_lg')
from vqa_demo.
I have same issue
from vqa_demo.
Yes, the problem is that for each token, spacy is returning a 384 dim vector instead of 300. One quick fix is to take first 300 values only like - question_tensor[0,j,:] = tokens[j].vector[:300] since the VQA model takes a 300 length vector as word_feature_size.
from vqa_demo.
I'm getting this error is I reduce the size.
UserWarning: Trying to unpickle estimator LabelEncoder from version pre-0.18 when using version 0.19.1. This might lead to breaking code or invalid results. Use at your own risk.
Does anyone know what this is? Urgent help needed
from vqa_demo.
I solved the same issue with the vector dimension and also the userwarning dedicated to newer scikit version (it is neccessary to replicke the file with joblib.dump).
After these changes I am not able to replicate your results while downloading pretrained models. The test image and question gives best answer as "30 % - electricity"instead of train. All what questions result in number answer, Where questions result in yes/no answer.
Can you tell me, whether the dimension reduction should result in such a distortion?
from vqa_demo.
Yes it will. How do we fix this? Can anyone please help. Why is the vector size 384 when it should be 300?
from vqa_demo.
I tried the following
word_embedding = spacy.load('en', vectors = 'en_glove_cc_300_1m_vectors')
tokens = word_embedding(question)
word_embeddings = word_embedding.vocab.vectors.resize((1000000, 300))
question_tensor = np.zeros((1, 30, 300))
for j in range(len(tokens)):
question_tensor[0,j,:] = tokens[j].vector
return question_tensor
Even after resizing the vectors, the error is removed but it is giving wrong answers. No idea what to do :/ I tried really hard but couldn't find anything online too.
from vqa_demo.
from vqa_demo.
I'm using the following versions
Keras = 2.0.5
Tensorflow = 1.2.0
from vqa_demo.
when is execute the following
model = gensim.models.KeyedVectors.load_word2vec_format('./data/GoogleNews-vectors-negative300.bin.gz',
binary=True)`
i get an error saying
ValueError: could not broadcast input array from shape (75) into shape (300)
can anyone help me
Thanks In advance!!!!!!!!!!!!
from vqa_demo.
Related Issues (20)
- image_features[0,:] = get_image_model(CNN_weights_file_name).predict(im)[0] ValueError: could not broadcast input array from shape (1000) into shape (4096) HOT 8
- Error while predicting HOT 1
- h5py/h5f.pyx in h5py.h5f.open() OSError: Unable to open file (file signature not found) HOT 5
- Error predicting HOT 2
- Error showing: No module named 'models' HOT 1
- ValueError: could not broadcast input array from shape (300) into shape (100)
- related to Vgg16...(please reply soon)
- you are trying to load a weight file containing 7 layers into a model with 0 layers
- Hi can you tell how you created the label encoding HOT 1
- VGG HOT 1
- Link to vgg16_weights.h5 is broken HOT 2
- from models.VQA.VQA import VQA_MODEL, error while installing models
- Accuracy fo pretrained model
- Error while loading image features
- Unexpected result on prediction even after using en_vectors_web_lg
- Can't access the download link of the drive for vgg16_weights.h5 HOT 2
- I am having this issue in the last step, 'NoneType' object has no attribute 'zfill' HOT 2
- fuck you shit code
- fuck your shi code
- Incompatible VQA_MODEL.json file with latest keras version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vqa_demo.