Detailed calculation of the convolution operation of the convolutional neural network (summary)

Table of contents

1. 输入图像为正方形
2. 输入图像为矩形
3. 卷积操作的三种模式
4. 池化操作
5. 空洞卷积

1. The image is a square

insert image description here

W: input image size
F: convolution kernel size
P: padding padding
S: step size
N: output image size after convolution

2. The image is a rectangle, and the input size is W×H

insert image description here

3. Three modes of convolution operation

insert image description here

3.1Full mode: Convolution starts when the first pixel is encountered, and the image size after full mode convolution is

Among them, the step size is 1, the image size is N1xN1, the convolution kernel size is N2xN2, and the image size after convolution is: (N1+N2-1) x (N1+N2-1)

3.2Same mode: returns the size of the convolution center and the center part of the input image. The size of the image after same mode convolution is
1, the size of the image is N1xN1, the size of the convolution kernel is N2xN2, and the size of the image after convolution is : N1×N1 (step size is 1, the size remains unchanged after convolution)

3.3Vaild mode: The sliding step is S, the image size is N1xN1, the convolution kernel size is N2xN2, the image size after convolution: (N1-N2)/S+1, padding is 0

4. Pooling operation

The size of the image after the pooling operation is as follows:

insert image description here

W: image width
H: image height
F: convolution kernel size
S: step size
D: image depth (number of channels)

[If there is a remainder, it will be rounded down]

5. Atrous convolution

insert image description here

d: the hole rate of the hole convolution
p: padding
K: the size of the convolution kernel
S: the step size

Guess you like

Origin blog.csdn.net/weixin_44312422/article/details/121009357