更新时间:2023-12-02 12:28:52
您所说的错误是输入大小的差异.预先训练的Imagenet模型比Cifar-10(32,32)拍摄更大的图像.
Your error as you said is the input size difference. The pre trained Imagenet model takes a bigger size of image than the Cifar-10 (32, 32).
您需要像这样手动指定模型的输入形状.
You need to specify the input_shape of the model before hand like this.
Inceptionv3_model = InceptionV3(weights='imagenet', include_top=False, input_shape=(32, 32, 3))
For more explanation you can check this tutorial.