Convolutional/Max pooling layer의 output size 계산식

Seohyun·2023년 8월 20일
0

정리

목록 보기
6/9

1D

1D conv

Output size=Input sizeKernel size+2PaddingStride+1Output\ size = \frac{Input \ size - Kernel \ size + 2 * Padding}{Stride} + 1

1D deconv

Output size=(Input size1)Stride+Kernel size2PaddingOutput \ size = (Input \ size - 1) * Stride + Kernel \ size - 2 * Padding

2D

2D conv

Output height=Input heightKernel height+2Padding heightStride height+1Output \ height = \frac{Input \ height - Kernel \ height + 2 * Padding \ height}{Stride \ height} + 1
Outputwidth=Input widthKernel width+2Padding widthStride width+1Output width = \frac{Input \ width - Kernel \ width + 2 * Padding \ width}{Stride \ width} + 1

2D deconv

Output height=(Input height1)Stride height+Kernel height2Padding heightOutput \ height = (Input \ height - 1) * Stride \ height + Kernel \ height - 2 * Padding \ height
Output width=(Input width1)Stride width+Kernel width2Padding widthOutput \ width = (Input \ width - 1) * Stride \ width + Kernel \ width - 2 * Padding \ width

2D Maxpooling

Output size=Input sizePool sizeStride+1Output \ size = \frac{Input \ size - Pool \ size}{Stride} + 1

3D

3D conv

Output height=Input heightKernel height+2Padding heightStride height+1Output \ height = \frac{Input \ height - Kernel \ height + 2 * Padding \ height}{Stride \ height} + 1
Output width=Input widthKernel width+2Padding widthStride width+1Output \ width = \frac{Input \ width - Kernel \ width + 2 * Padding \ width}{Stride \ width} + 1
Output depth=Input depthKernel depth+2Padding depthStride depth+1Output \ depth = \frac{Input \ depth - Kernel \ depth + 2 * Padding \ depth}{Stride \ depth} + 1

3D deconv

Output depth=(Input depth1)Stride depth+Kernel depth2Padding depthOutput \ depth = (Input \ depth - 1) * Stride \ depth + Kernel \ depth - 2 * Padding \ depth
Output height=(Input height1)Stride height+Kernel height2Padding heightOutput \ height = (Input \ height - 1) * Stride \ height + Kernel \ height - 2 * Padding \ height
Output width=(Input width1)Stride width+Kernel width2Padding widthOutput \ width = (Input \ width - 1) * Stride \ width + Kernel \ width - 2 * Padding \ width
profile
Hail hamster

0개의 댓글