【发布时间】:2021-03-02 09:09:45
【问题描述】:
真的不知道自己在做什么,跟着这个教程处理 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”
所以,是的,只是想弄清楚如何获取此数据集中的图层以及其他图层的名称
【问题讨论】:
标签: python tensorflow keras