Padding and stride stride in convolutional layers hands-on deep learning v2 pytorch

Hyperparameters for convolutional layers:

  • Kernel convolution kernel size
  • Padding
  • Stride

1. Padding in the convolutional layer

insert image description here
insert image description here
insert image description here
insert image description here

2 Stride in the convolutional layer

insert image description here
insert image description here
insert image description here
insert image description here

3. Code implementation

insert image description here
insert image description here
insert image description here

3. Q&A

    1. Hyperparameter kernel size, the filling is generally kernel size -1, and the stride generally depends on whether the speed of calculation needs to be optimized.
    1. The variable length of the convolution kernel is generally chosen to be an odd number, which is convenient for calculation.
    1. Generally, everyone directly uses the classic network structure, such as ResNet.
    1. The essence of machine learning is a compression algorithm. Machine learning will always lose information, just like information theory.
    1. The bottom layer uses a large Kernel, and the upper layer uses a small Kernel
    1. Different convolutional layers can be understood as identifying multiple different textures of an image.
    1. The Industrial Revolution is about replacing human beings with machines. Science is also a process from expensive to cheap.

reference

https://www.bilibili.com/video/BV1Th411U7UN?p=1

Guess you like

Origin blog.csdn.net/zgpeace/article/details/124033086