Hi Caruso,
thank you very much for your help! I finally figured out how to calculate the conv layer output dimensions.
With the formular:
Width_out = (Width_in - Width_filter + 2 * padding) / stride +1
equivalent for the heigth.
Than with 2x2 pooling the result is halved. Afterwards (Width_out * Height_out * N_output_channels) leads to the number of inputs for the flatten layer.
Am I correct so far?