需要为tensorflow中的特征提取模型生成新模型吗?
我在做一个图像字幕的教程。当我试着按照教程中的 在特征提取模型部分,我想知道为什么当它将include_top设置为false时,它需要基于最后一层生成新模型(image_model.layers[-1].output) 如果您试图比较image\u model.summary()和image\u features\u extract\u model.summary(),结果显然是相同的层。。谁能给我解释一下吗需要为tensorflow中的特征提取模型生成新模型吗?,tensorflow,feature-extraction,Tensorflow,Feature Extraction,我在做一个图像字幕的教程。当我试着按照教程中的 在特征提取模型部分,我想知道为什么当它将include_top设置为false时,它需要基于最后一层生成新模型(image_model.layers[-1].output) 如果您试图比较image\u model.summary()和image\u features\u extract\u model.summary(),结果显然是相同的层。。谁能给我解释一下吗 image_model = tf.keras.applications.Incept
image_model = tf.keras.applications.InceptionV3(include_top=False,
weights='imagenet')
new_input = image_model.input
hidden_layer = image_model.layers[-1].output
image_features_extract_model = tf.keras.Model(new_input, hidden_layer)
这是个好问题。我看不出有什么不同。事实上,在这两个过程中运行一个随机样本,您将得到相同的输出。