Может кто-нибудь сказать мне, как исправить вес модели, кроме последнего плотного слоя.
мой код:
VGG_model=keras.applications.vgg16.VGG16(input_shape=(224,224,3),weights='imagenet', include_top=True)# Generate a model with all layers (with top)
#Add a layer where input is the output of the second last layer
x = Dense(2, activation='softmax', name='predictions')(VGG_model.layers[-2].output)