VQA-Demo-GUI icon indicating copy to clipboard operation
VQA-Demo-GUI copied to clipboard

the accuracy of the answer

Open BoatInTheRiver opened this issue 5 years ago • 2 comments

I run your code,and why the accuracy of the answer is so low ?Please tell me how you train it.

BoatInTheRiver avatar Jul 08 '19 03:07 BoatInTheRiver

Like this.false

BoatInTheRiver avatar Jul 17 '19 05:07 BoatInTheRiver

Hello, please tell me how to solve the following error information, thanks a lot!

Function:

def get_VQA_model(VQA_weights_file_name): ''' Given the VQA model and its weights, compiles and returns the model ''' vqa_model = VQA_MODEL()

vqa_model.load_weights(VQA_weights_file_name)     **Here,i got a  error!**
vqa_model.compile(loss=keras.losses.categorical_crossentropy,
                  optimizer=keras.optimizers.Adadelta(),
                  metrics=['accuracy'])
return vqa_model

Error Information:

Traceback (most recent call last): File "E:/pycharm-workspace/VQA-Demo-GUI-master/VQA-VGG-16+LSTM-GUI.py", line 246, in start_prediction vqa_model = get_VQA_model(model,VQA_weights_file_name) File "E:/pycharm-workspace/VQA-Demo-GUI-master/VQA-VGG-16+LSTM-GUI.py", line 73, in get_VQA_model vqa_model.load_weights(VQA_weights_file_name) File "C:\Users\lucky\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\training.py", line 162, in load_weights return super(Model, self).load_weights(filepath, by_name) File "C:\Users\lucky\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1411, in load_weights self._assert_weights_created() File "C:\Users\lucky\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1673, in _assert_weights_created self.name) ValueError: Weights for model sequential_2 have not yet been created. Weights are created when the Model is first called on inputs or build() is called with an input_shape.

lianglili avatar Sep 29 '20 08:09 lianglili