当前位置:网站首页>The calculation of stripe, kernel and padding in CNN
The calculation of stripe, kernel and padding in CNN
2022-07-03 03:14:00 【Mr. paidaxing C】
During the construction of convolution network , Encountered a confusion , That is how to calculate the output size of the network according to some super parameters of convolution , Convolution size change
In order to make the calculation process more intuitive , Define the following parameters
Definition
Definition
Definition
Enter the dimension as
The output size is
Then the convolution size changes to
for example , Input is 28 , Convolution kernels for 3*3 , step stride=1,padding=1, From the above formula, the new output is
Output remains 28 unchanged
But there must be a situation that cannot be divisible , stay PyTorch Can be seen in
Pooling is similar to
Shape:
- Input: :math:`(N, C, H_{in}, W_{in})`
- Output: :math:`(N, C, H_{out}, W_{out})`, where
.. math::
H_{out} = \left\lfloor\frac{H_{in} + 2 * \text{padding[0]} - \text{dilation[0]}
\times (\text{kernel\_size[0]} - 1) - 1}{\text{stride[0]}} + 1\right\rfloor
.. math::
W_{out} = \left\lfloor\frac{W_{in} + 2 * \text{padding[1]} - \text{dilation[1]}
\times (\text{kernel\_size[1]} - 1) - 1}{\text{stride[1]}} + 1\right\rfloor
stay PyTorch For conditions that cannot be divided, the default is to round down , You can choose to round up
边栏推荐
- The process of connecting MySQL with docker
- Idea set method call ignore case
- 监听对象中值变化及访问
- Opengauss database development and debugging tool guide
- Bigvision code
- How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
- Update and return document in mongodb - update and return document in mongodb
- Do you really understand relays?
- 分布式事务
- Installation and use of memory leak tool VLD
猜你喜欢
VS 2019 配置tensorRT生成engine
[shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling
I2C subsystem (I): I2C spec
你真的懂继电器吗?
On the adjacency matrix and adjacency table of graph storage
MySQL practice 45 [SQL query and update execution process]
From C to capable -- use the pointer as a function parameter to find out whether the string is a palindrome character
docker安装redis
Yiwen takes you to know ZigBee
Nasvit: neural architecture search of efficient visual converter with gradient conflict perception hypernetwork training
随机推荐
The file marked by labelme is converted to yolov5 format
Idea set method call ignore case
45 lectures on MySQL [index]
从输入URL到页面展示这中间发生了什么?
umi 路由拦截(简单粗暴)
I2C 子系统(一):I2C spec
Find the storage address of the elements in the two-dimensional array
Three. JS local environment setup
docker安装redis
I2C 子系统(三):I2C Driver
Solve high and send system Currenttimemillis Caton
Bigvision code
How to make backgroundworker return an object
900W+ 数据,从 17s 到 300ms,如何操作
后管中编辑与预览获取表单的值写法
Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception
[pyg] understand the messagepassing process, GCN demo details
敏捷认证(Professional Scrum Master)模拟练习题
Use of El tree search method
I2C subsystem (I): I2C spec