当前位置:网站首页>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\rfloorstay PyTorch For conditions that cannot be divided, the default is to round down , You can choose to round up
边栏推荐
- Basic information of Promethus (I)
- MySql实战45讲【事务隔离】
- 监听对象中值变化及访问
- 分布式事务
- Docker install MySQL
- Unity3d RPG implementation (medium)
- How to limit the size of the dictionary- How to limit the size of a dictionary?
- Agile certification (professional scrum Master) simulation exercise-2
- I2C subsystem (I): I2C spec
- 别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
猜你喜欢

docker安装redis

Force deduction ----- the minimum path cost in the grid

别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
![MySQL Real combat 45 [SQL query and Update Execution Process]](/img/cd/3a635f0c3bb4ac3c8241cb77285cc8.png)
MySQL Real combat 45 [SQL query and Update Execution Process]

VS 2019安装及配置opencv

The idea setting code is in UTF-8 idea Properties configuration file Chinese garbled

函数栈帧的创建与销毁

Hi3536C V100R001C02SPC040 交叉编译器安装

Unity3d RPG implementation (medium)

TCP handshake three times and wave four times. Why does TCP need handshake three times and wave four times? TCP connection establishes a failure processing mechanism
随机推荐
[mathematical logic] normal form (conjunctive normal form | disjunctive normal form | major item | minor item | maximal item | minor item | principal conjunctive normal form | principal disjunctive no
[error record] the parameter 'can't have a value of' null 'because of its type, but the im
Vs 2019 configure tensorrt to generate engine
解决高并发下System.currentTimeMillis卡顿
Anhui University | small target tracking: large-scale data sets and baselines
Gavin teacher's perception of transformer live class - rasa project's actual banking financial BOT Intelligent Business Dialogue robot architecture, process and phenomenon decryption through rasa inte
ComponentScan和ComponentScans的区别
文件重命名
Réglez la hauteur et lancez le système. Currenttimemillis catton
Bigvision code
The base value is too large (the error is marked as "08") [duplicate] - value too great for base (error token is'08') [duplicate]
labelimg生成的xml文件转换为voc格式
【AI实战】应用xgboost.XGBRegressor搭建空气质量预测模型(一)
Destroy the session and empty the specified attributes
函数栈帧的创建与销毁
About HTTP cache control
PAT乙级“1104 天长地久”DFS优化思路
How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
[Chongqing Guangdong education] cultural and natural heritage reference materials of China University of Geosciences (Wuhan)
Can I use read-only to automatically implement properties- Is read-only auto-implemented property possible?