I am currently working on learning the features provided by a pre-trained network for image retrieval. Currently I take the features provided by the pre-trained network, use global max pooling to essentially provide me with a vector and then use fully connected layers to learn the feature vector. This has provided good results, although prone to over-fitting, particularly without dropout.
Is it possible/would it be beneficial to use a 1D convolutional layer instead of the fully connected layers to learn the features? Bearing in mind this is essentially still image data that has just been transformed.
model.add(GlobalAveragePooling2D(input_shape=input_shape))
model.add(Dense(256, activation="relu"))
model.add(Dropout(0.2))
model.add(Dense(256, activation="relu"))
I'm not sure how to try this practically in Keras as 1D convolutional layers only seem to accept a 3 dimensional input tensor.
Any suggestions welcome!