错误为:ValueError: Cannot feed value of shape (5000,) for Tensor ‘y-input:0’, which has shape ‘(?, 10)’ 如何解决?
作者会来这里看吗?小弟有几个问题。在迁移学习那一章,第一版用的是pb格式的inceptionV3,image_data = tf.gfile.GFile(image_path, ‘rb’).read()然后直接把image_data feed给网络, inceptionV3要求格式是299*299,那么图片的resize是在哪里做的呢?在下载的模型里面吗?我有这个问题是同样的数据,我用第一版的迁移学习效果很好,验证集上正确率98%以上,但是用Keras 自带的inception_V3模型和预训练参数效果就很差验证集上正确率才60%,不知道问题在哪里。
下面是Keras的主要代码,实在想不通问题在哪里
base_model = InceptionV3(input_shape=(IMAGE_SIZE, IMAGE_SIZE, 3),weights=’imagenet’,include_top=False)x = base_model.outputx = Global**eragePooling2D()(x)predictions = Dense(3,activation=’softmax’)(x)model = Model(inputs=base_model.input,outputs=predictions)
InceptionV3 的参数也是不可训练的,只训练最后全连接层的参数。
请给我一份源代码蟹蟹,yxh1164691705@qq.com
本页面右侧有下载资源
下载的压缩包损坏了,能给我发一份吗?2994162479@qq.com感谢😊
请问有书中的代码吗?请发一份 谢谢;907565779@qq.com
作者会来这里看吗?小弟有几个问题。
在迁移学习那一章,第一版用的是pb格式的inceptionV3,
image_data = tf.gfile.GFile(image_path, ‘rb’).read()
然后直接把image_data feed给网络, inceptionV3要求格式是299*299,那么图片的resize是在哪里做的呢?在下载的模型里面吗?
我有这个问题是同样的数据,我用第一版的迁移学习效果很好,验证集上正确率98%以上,但是用Keras 自带的inception_V3模型和预训练参数效果就很差验证集上正确率才60%,不知道问题在哪里。
下面是Keras的主要代码,实在想不通问题在哪里
base_model = InceptionV3(input_shape=(IMAGE_SIZE, IMAGE_SIZE, 3),weights=’imagenet’,include_top=False)
x = base_model.output
x = Global**eragePooling2D()(x)
predictions = Dense(3,activation=’softmax’)(x)
model = Model(inputs=base_model.input,outputs=predictions)
InceptionV3 的参数也是不可训练的,只训练最后全连接层的参数。
请给我一份源代码蟹蟹,yxh1164691705@qq.com
下载的压缩包损坏了,能给我发一份吗?2994162479@qq.com感谢😊
请问有书中的代码吗?请发一份 谢谢;907565779@qq.com