Andre Augusto
Andre Augusto

Reputation: 84

Why keras convolution make output size a bit smaller

I was trying to create a autoencoder, but each convolution layer makes the output shape smaller

input_1 (InputLayer)             (None, 3, 32, 32)     0                              
convolution2d_1 (Convolution2D)  (None, 32, 30, 30)    896
maxpooling2d_1 (MaxPooling2D)    (None, 32, 15, 15)    0        
convolution2d_2 (Convolution2D)  (None, 16, 13, 13)    4624        

In the end of the encoder, the output size becomes

(None, 3, 466, 466) 

instead of

(None, 3, 512, 512)

There is a way to make the network output exactly (None, 3, 512, 512)?

Upvotes: 1

Views: 58

Answers (1)

Andre Augusto
Andre Augusto

Reputation: 84

Its because of borders, i fixed using border_mode='same'

Upvotes: 1

Related Questions