iamaaditya / VQA_Demo

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

I am having this issue in the last step, 'NoneType' object has no attribute 'zfill' #39

Closed hirafs closed 3 years ago

hirafs commented 3 years ago

image

Boikki commented 3 years ago

hello there, I have the same problem. Did you solved it by changing the sklearn version? And which version, plz.

hirafs commented 3 years ago

This solved my problem. I loaded the npy file directly

warnings.filterwarnings("ignore", category=DeprecationWarning) m = np.load(label_encoder_file_name) labels_list=[] for label in reversed(np.argsort(y_output)[0,-5:]): print ((str(round(y_output[0,label]*100,2))).zfill(5), "% ", m[label])