真的不知道我在做什么,遵循这个教程来处理deepdream图像https://www.youtube.com/watch?v=Wkh72OKmcKI
尝试从这里将基本模型数据集更改为any,特别是当前的InceptionResNetV2。InceptionV3使用"mixed0“直到"mixed10”,而前一个数据集显然使用了不同的命名系统。
将不得不改变这一部分
# Maximize the activations of these layers
names = ['mixed3', 'mixed5']
layers = [base_model.get_layer(name).output for name in names]
# Create the feature extraction model
dream_model = tf.keras.Model(inputs=base_model.input, outputs=layers)我收到一个错误“没有这样的层: mixed3”
是的,我只是想弄清楚如何获取此数据集中的图层以及其他图层的名称
发布于 2020-11-19 10:39:21
您可以简单地输入以下代码来查找模型架构(包括层名称)。
#Model denotes the Inception model
model.summary()或者可视化复杂的关系,
tf.keras.utils.plot_model(model, to_file='model.png')https://stackoverflow.com/questions/64904270
复制相似问题