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

Error while predicting #24

Closed pshreyasv100 closed 5 years ago

pshreyasv100 commented 5 years ago

ValueError Traceback (most recent call last)

in () 8 labelencoder = joblib.load(label_encoder_file_name) 9 for label in reversed(np.argsort(y_output)[0,-5:]): ---> 10 print (str(round(y_output[0,label]*100,2)).zfill(5), "% ", labelencoder.inverse_transform(label)) /home/shreyas/anaconda3/lib/python3.5/site-packages/sklearn/preprocessing/label.py in inverse_transform(self, y) 271 """ 272 check_is_fitted(self, 'classes_') --> 273 y = column_or_1d(y, warn=True) 274 # inverse transform of empty array is empty array 275 if _num_samples(y) == 0: /home/shreyas/anaconda3/lib/python3.5/site-packages/sklearn/utils/validation.py in column_or_1d(y, warn) 786 return np.ravel(y) 787 --> 788 raise ValueError("bad input shape {0}".format(shape)) 789 790 ValueError: bad input shape ()