真的不知道我在做什么,按照本教程处理deepdream图像https://www.youtube.com/watch?v=Wkh72OKmcKI
正在尝试从此处将基本模型数据集更改为任意,https://keras.io/api/applications/#models-for-image-classification-with-weights-trained-on-imagenet特别是当前的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”
所以,是的,只是想弄清楚如何获得这个数据集中的层以及其他层的名称
您只需输入以下代码即可找到模型体系结构(包括层名称)
或者想象复杂的关系
相关问题 更多 >
编程相关推荐