The following is the model.summary()
output of a keras model. I am trying to extract a sub-model from this, that starts from the output of layer flatten_1
and ends at the output of the last layer (dense_3
). Is it possible? If yes, What would be the Keras syntax?
zero_padding2d_1 (ZeroPaddin (None, 226, 226, 3) 0
conv2d_1 (Conv2D) (None, 224, 224, 64) 1792
max_pooling2d_1 (MaxPooling2 (None, 112, 112, 64) 0
zero_padding2d_2 (ZeroPaddin (None, 114, 114, 64) 0
conv2d_2 (Conv2D) (None, 112, 112, 128) 73856
max_pooling2d_2 (MaxPooling2 (None, 56, 56, 128) 0
zero_padding2d_3 (ZeroPaddin (None, 58, 58, 128) 0
conv2d_3 (Conv2D) (None, 56, 56, 256) 295168
max_pooling2d_3 (MaxPooling2 (None, 28, 28, 256) 0
flatten_1 (Flatten) (None, 200704) 0
dense_1 (Dense) (None, 64) 12845120
dropout_1 (Dropout) (None, 64) 0
dense_2 (Dense) (None, 256) 16640
dropout_2 (Dropout) (None, 256) 0
dense_3 (Dense) (None, 2) 514