title: Output size of convolutional auto-encoder in Keras
body: <p>I am doing the convolutional autoencoder tutorial written by the author of the Keras library:
  <a href="https://blog.keras.io/building-autoencoders-in-keras.html" rel="nofollow">https://blog.keras.io/building-autoencoders-in-keras.html</a></p>
  
  <p>However, when I launch exactly the same code, and analyse the network's architecture with summary(), it seems that the output size is not compatible with the input one (necessary in case of autoencoders). Here is the output of summary():</p>
  
  <pre><code>**____________________________________________________________________________________________________
  Layer (type)                     Output Shape          Param #     Connected to                     
  ====================================================================================================
  input_1 (InputLayer)             (None, 1, 28, 28)     0                                            
  ____________________________________________________________________________________________________
  convolution2d_1 (Convolution2D)  (None, 16, 28, 28)    160         input_1[0][0]                    
  ____________________________________________________________________________________________________
  maxpooling2d_1 (MaxPooling2D)    (None, 16, 14, 14)    0           convolution2d_1[0][0]            
  ____________________________________________________________________________________________________
  convolution2d_2 (Convolution2D)  (None, 8, 14, 14)     1160        maxpooling2d_1[0][0]             
  ____________________________________________________________________________________________________
  maxpooling2d_2 (MaxPooling2D)    (None, 8, 7, 7)       0           convolution2d_2[0][0]            
  ____________________________________________________________________________________________________
  convolution2d_3 (Convolution2D)  (None, 8, 7, 7)       584         maxpooling2d_2[0][0]             
  ____________________________________________________________________________________________________
  maxpooling2d_3 (MaxPooling2D)    (None, 8, 3, 3)       0           convolution2d_3[0][0]            
  ____________________________________________________________________________________________________
  convolution2d_4 (Convolution2D)  (None, 8, 3, 3)       584         maxpooling2d_3[0][0]             
  ____________________________________________________________________________________________________
  upsampling2d_1 (UpSampling2D)    (None, 8, 6, 6)       0           convolution2d_4[0][0]            
  ____________________________________________________________________________________________________
  convolution2d_5 (Convolution2D)  (None, 8, 6, 6)       584         upsampling2d_1[0][0]             
  ____________________________________________________________________________________________________
  upsampling2d_2 (UpSampling2D)    (None, 8, 12, 12)     0           convolution2d_5[0][0]            
  ____________________________________________________________________________________________________
  convolution2d_6 (Convolution2D)  (None, 16, 10, 10)    1168        upsampling2d_2[0][0]             
  ____________________________________________________________________________________________________
  upsampling2d_3 (UpSampling2D)    (None, 16, 20, 20)    0           convolution2d_6[0][0]            
  ____________________________________________________________________________________________________
  convolution2d_7 (Convolution2D)  (None, 1, 20, 20)     145         upsampling2d_3[0][0]             
  ====================================================================================================
  Total params: 4385
  ____________________________________________________________________________________________________**
  </code></pre>