vgg16_model = tf.keras.applications.vgg16.VGG16()
model= Sequential()
for layer in vgg16_model.layers[:-1]:
model.add(layer)
model.summary() #The last dense layer is removed till now
for layer in model.layers:
layer.trainable=False #for transfer learning i have freeze the layers
model.add(Dense(2, activation='softmax'))
model.summary() #now when i add dense layers trainable parameters of model get changed