Keras: ValueError: decode_predictions expects a batch of predictions

前端 未结 2 1603
礼貌的吻别
礼貌的吻别 2021-01-12 05:32

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         


        
2条回答
  •  礼貌的吻别
    2021-01-12 06:16

    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.

提交回复
热议问题