CNN, which layer to choose for a similarity measure I built a model (InceptionResnet v2) to classify images and I would like to use it to measure similarity between objects. 

One way to measure that similarity is to catch an intermediate layer's results from two vector and look their distance.

I don't know how to choose the layer, my last layers are :

Conv -> Flatten(98304,) -> Dense(256,) -> Dense (softmax) 

I hesitate between Flatten and first Dense, how to choose ?
For similarity computations, you should generally prefer the last (before softmax) dense layer. This layer will generally capture the most higher level representation of the images. It is also preferable to have the size of vector as small as possible when similarities are to be computed for efficiency reasons.