How to remove layers from a keras model in order to use as baseline for creating another model
问题 I need to use a pre-trained model in Keras(keras.applications.VGG16) as a baseline for creating another model(for doing transfer learning) from the first layers of it. The end goal is to freeze and export the model for deployment on a raspberry pi with AIY vision kit. I've tried the common approach of: model_base = keras.applications.VGG16(input_tensor=inputs) x = model_base.get_layer(backbone_layer).output x = keras.layers.Flatten()(x) x = keras.layers.Dense(1)(x) model = keras.models.Model