I am fine-tuning a VGG16 model on 20 classes with 500k images I was wondering how do you chose the size of the dense layer (the one before the prediction layer which has a size 20). I would prefer not to do a grid search seeing how long it take to train my model.
Also how many Dense layer should I put after my global average pooling ?
base_model = keras.applications.VGG16(weights='imagenet', include_top=False) x = base_model.output x = GlobalAveragePooling2D()(x) x = Dense(???, activation='relu')(x) x = Dropout(0.5, name='drop_fc1')(x) prediction_layer = Dense(class_number, activation='softmax')(x)
I haven't see particular rules about how its done, are there any ? Is it link with the size of the convolution layer ?