본문 바로가기
IT/machine learning

Calculate Convolutional Layer Output size

by Jang HyunWoong 2018. 7. 5.

input image size -> 28x28x1 (width x height x channel)

W: image width
F: filter width
P: padding size
S: Stride number

[Example:]

input image (28 x 28 x 1)
convolution layer filter size (5 x 5) and 20 filters
stride = 1
padding = 0

So, the 1st output size is 24 x 24 x 20 (width x height x filters)
* Addition:
If there is max pooling layer after convolution filter, 

W: input width
F: filter width
S: Stride number

input size (24 x 24 x 20)
max pooling layer filter size (2 x 2) and stride 2

So, the 1st max pooling output is 12 x 12 x 20 (width x height x filters)



반응형