iamaaditya / VQA_Demo

Visual Question Answering Demo on pretrained model
http://iamaaditya.github.io/2016/04/visual_question_answering_demo_notebook
MIT License
241 stars 133 forks source link

SyntaxError: invalid syntax #16

Closed anurgsrivastava closed 6 years ago

anurgsrivastava commented 6 years ago

File "demo.py", line 114 print str(round(y_output[0,label]*100,2)).zfill(5), "% ", labelencoder.inverse_transform(label) ^ How do I resolve this error? Please help.

tarana-shahin commented 3 years ago

hey anurgsrivastava how did you resolve this error?

anurgsrivastava commented 3 years ago

I don't completely remember but I believe the author fixed the issue by updating his notebook to run with Keras 2.1+ and Tensorflow 1.5+. I remember following the updated README had solved the issue for me. The issue was happening due to the difference in the dimensions of the spacy glove vector size. Can be the same for you also please check. Apologies I couldn't help much, it has been some time now.

iamaaditya commented 3 years ago

@anurgsrivastava and @tarana-shahin could you provide more detail about the error (the trace). Are you using Python 2 or 3? In Python 3, you need to use print() (with parenthesis).

I will take a look at the code and will try to fix any other bugs that it may have.

anurgsrivastava commented 3 years ago

@iamaaditya I wasn't having any issue. @tarana-shahin was having some issues. Also, thank you for this project, it saved me during my college. 🥇