Calculation of feature map size, receptive field, and parameter amount after convolution operation

1. The size of the output feature map

  • If dilated convolution is included, that is, when the dilation rate is not 1:

Insert image description here
Insert image description here
Insert image description here
Insert image description here

2. Calculation of receptive fields

Insert image description here

  • For example, after the image undergoes two 3*3 convolutions with a stride of 2, the receptive field is:

conv1: F = (1 - 1) * 2 + 3 = 3
conv2: F = (3 - 1) * 2 + 3 = 7

3. Parameters of the convolution kernel

Insert image description here

4. Computational amount of standard convolution and depth-separable convolution

Input feature map: C in × H × W C_{in}\times H\times WCin×H×W
standard convolution:C out C_{out}Cout K × K × C i n K\times K\times C_{in} K×K×CinThe convolution kernel
is depth separable convolution: 1 K × K × C in K\times K\times C_{in}K×K×CinDepth convolution + C out C_{out}Cout 1 × 1 × C i n 1\times 1\times C_{in} 1×1×CinPoint-wise convolution
output feature map: C out × H ′ × W ′ C_{out}\times H'\times W'Cout×H×W

  • The calculation amount of standard convolution is K × K × H ′ × W ′ × C in × C out K\times K\times H'\times W'\times C_{in}\times C_{out}K×K×H×W×Cin×Cout
  • The calculation amount of depth-separable convolution is K × K × H ′ × W ′ × C in + 1 × 1 × H ′ × W ′ × C in × C out K\times K\times H'\times W'\ times C_{in} + 1\times 1\times H'\times W'\times C_{in}\times C_{out}K×K×H×W×Cin+1×1×H×W×Cin×Cout

Reference links:
1) https://blog.csdn.net/DBlueink/article/details/114878888
2) https://blog.csdn.net/qq_36412570/article/details/115347200

Guess you like

Origin blog.csdn.net/m0_48086806/article/details/132334435