Dimensional changes after CNN convolutional pooling

Dimensional changes after CNN's convolution operation:

  1. Input dimensions:, W_{1} \times H_{1}\times D_{1}respectively represent the length, width and height of the input sample
  2. Hyperparameters of convolution operation
    1. Number of convolution kernels:K
    2. Convolution kernel size:F\times F
    3. Stride:S
    4. Padding:P
  3. The output dimension is W_{2} \times H_{2}\times D_{2}, where
    1. W_{2} = [(W_{1}-F+2P)/S]+1
    2. H_{2} = [(H_{1}-F+2P)/S]+1
    3. D_{2} = K
  4. Due to the parameter sharing mechanism of CNN, the number of parameters of each convolution kernel is F*F*D_{1}, there are (F*F*D_{1})*Ka total of weights and Kbiases
  5. If you want to be consistent after convolution with a convolution matrix length and width before, when S=1the time
    1. When the convolution kernel is 3, padding select 1
    2. When the convolution kernel is 5, padding select 2
    3. When the convolution kernel is 7, padding chooses 3

Dimension changes after CNN's pooling operation:

  1. Input dimensions:, W_{1} \times H_{1}\times D_{1}respectively represent the length, width and height of the input sample
  2. Hyperparameters for pooling operations
    1. Pooling layer size:F\times F
    2. Stride:S
    3. Padding:P
  3. The output dimension is W_{2} \times H_{2}\times D_{2}, where
    1. W_{2} = [(W_{1}-F+2P)/S]+1
    2. H_{2} = [(H_{1}-F+2P)/S]+1
    3. D_{2} = D_{1}

Reference materials: https://blog.csdn.net/qq_41670192/article/details/79231732

 

Guess you like

Origin blog.csdn.net/lz_peter/article/details/87870270