I have doubt regarding the following step where the model is created to do the following task:
“Creates a vgg model that returns a list of intermediate output values.”
def get_layer_outputs(vgg, layer_names):
outputs = [vgg.get_layer(layer[0]).output for layer in layer_names]
model = tf.keras.Model([vgg.input], outputs)
return model
content_layer = [('block5_conv4', 1)] vgg_model_outputs = get_layer_outputs(vgg, STYLE_LAYERS + content_layer)
To get intermediate layers activations, should not the input image be passed thorough all the layers from start upto that selected layers?
But in above code, it seems that the model is created which takes an input and generates output by directly passing input to that layers?
What am I missing here?