Comments (8)
It seems the model is not being loaded. Did you download the VGG weights file (see this) ?
from vqa_demo.
VGG weights file is downloaded and the image features are also extracted.
My theano version is 0.8.2.
Keras version is 1.0.2.
image_features dimenstion = (1, 4096)
question_features dimension = (1, 7, 300)
from vqa_demo.
- First make sure you are running the code of this repo, which was updated to make changes to work with Keras 1+ (do a git pull origin master ) if you need to get the latest.
- Run the command using following theano flag
THEANO_FLAGS='exception_verbosity=high' python demo.py
and then paste the error here. It seems some variable size mis-match but I do not get the same error.
from vqa_demo.
Now this error appears for
THEANO_FLAGS='exception_verbosity=high' python demo.py -image_file_name test.jpg -question "Is there a man in the picture?":
`Using Theano backend.
Loading image features ...
Loading question features ...
Traceback (most recent call last):
File "demo.py", line 114, in
main()
File "demo.py", line 95, in main
question_features = get_question_features(unicode(args.question, 'utf-8'))
File "demo.py", line 72, in get_question_features
word_embeddings = spacy.load('en', vectors='en_glove_cc_300_1m_vectors')
File "/home/iqbal/.local/lib/python2.7/site-packages/spacy/init.py", line 16, in load
vectors_package = get_package_by_name(vectors, via=via)
File "/home/iqbal/.local/lib/python2.7/site-packages/spacy/util.py", line 41, in get_package_by_name
lang = get_lang_class(name)
File "/home/iqbal/.local/lib/python2.7/site-packages/spacy/util.py", line 28, in get_lang_class
raise RuntimeError('Language not supported: %s' % lang)
RuntimeError: Language not supported: en_glove_cc_300_1m_vectors
`
I tried to put spacy.set_lang_class('en_glove_cc_300_1m_vectors', 'vectors')
but that didn't work [it worked for the jupyter demo; when the same error was over there]
from vqa_demo.
You might need to update your spacy or change the model, see here #6
from vqa_demo.
Try this two commands to get your glove vectors running
sputnik --name spacy --repository-url http://index.spacy.io install en==1.1.0
sputnik --name spacy en_glove_cc_300_1m_vectors
from vqa_demo.
Thank you :) issue is solved. I added this line in the demo.py after importing spacy.
spacy.set_lang_class('en_glove_cc_300_1m_vectors', None)
from vqa_demo.
Thanks @anujshah1003 and @iqbal-chowdhury
Close #7
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.