top_model = Sequential() top_model.add(Flatten(input_shape=vgg16.output_shape[1:])) top_model.add(Dense(256, activation='relu')) top_model.add(Dropout(0.5)) top_model.add(Dense(nb_classes, activation='softmax')) model = Model(inputs=vgg16.input, outputs=top_model(vgg16.output)) model.summary() _________________________________________________________________ Layer (type) Output Shape Param # =====