Finetuning VGG-16 on GPU in Keras: memory consumption
问题 I'm fine-tuning VGG-16 for my task. The idea is that I load the pretrained weights, remove the last layer (which is softmax with 1000 outputs) and replace it with a softmax with a few outputs. Then I freeze all the layers but the last and train the model. Here is the code that builds the original model and loads the weights. def VGG_16(weights_path=None): model = Sequential() model.add(ZeroPadding2D((1,1),input_shape=(224,224,3))) model.add(Conv2D(64, (3, 3), activation='relu')) model.add