I\'m using keras\' pre-trained model VGG16, following this link: Keras VGG16 I\'m trying to decode the prediction output into word of what\'s in the image:
m
You should change a first line to:
model = VGG16(weights='imagenet', include_top=True)
Without this line your model is producing a 512 feature maps with size of 7 x 7 pixels. This the reason behind your error.