Keras: ValueError: decode_predictions expects a batch of predictions

前端 未结 2 1606
礼貌的吻别
礼貌的吻别 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:12

    Just to add on the correct answer by @Marcin Możejko

    The same applies to the other available models, so you must always include the top three layers:

    vgg19 <- application_vgg19(include_top = TRUE, weights = "imagenet")
    
    model_resnet50 <- application_resnet50(include_top = TRUE, weights = "imagenet")
    
    model_inception_v3 <- application_inception_v3(include_top = TRUE, weights = "imagenet")
    
    model_xception <- application_xception(include_top = TRUE, weights = "imagenet")
    

提交回复
热议问题