Extract feature layer
dineshbvadhia opened this issue · comments
Henry Thornton commented
Hi! How do you extract the AveragePooling2D layer?
In keras for inceptionV3, it is:
model = Model(inputs=base_model.input, outputs=base_model.get_layer('avg_pool').output)
Abhijit Balaji commented
Use model.summary() to find out the layer name and then feed the corresponding layer name to model.get_layer()
Kent Sommer commented
Abhijit's answer is correct, however, the name is not explicitly given so its the default name for an average pooling layer with a number after indicating which layer it is in the model. I'll close this out now, feel free to re-open if you need more assistance.