tensorflow中padding的两种类型对比
来源:互联网 发布:网络恢复mac系统 编辑:程序博客网 时间:2024/06/03 19:53
SAME means that the output feature map has the same spatial dimensions as the input feature map. Zero padding is introduced to make the shapes match as needed, equally on every side of the input map.
Padding could be used in convolution and pooling operations.VALIDmeans no padding.
Here, take pooling for example:
down vote
If you like ascii art:
"VALID"
= without padding:inputs: 1 2 3 4 5 6 7 8 9 10 11 (12 13) |________________| dropped |_________________|
"SAME"
= with zero padding:pad| |pad inputs: 0 |1 2 3 4 5 6 7 8 9 10 11 12 13|0 0 |________________| |_________________| |________________|
In this example:
- Input width = 13
- Filter width = 6
- Stride = 5
Notes:
"VALID"
only ever drops the right-most columns (or bottom-most rows)."SAME"
tries to pad evenly left and right, but if the amount of columns to be added is odd, it will add the extra column to the right, as is the case in this example (the same logic applies vertically: there may be an extra row of zeros at the bottom).
The TensorFlow Convolution example gives an overview about the difference between SAME
and VALID
:
For the
SAME
padding, the output height and width are computed as:out_height = ceil(float(in_height) / float(strides[1]))
out_width = ceil(float(in_width) / float(strides[2]))
And
For the
VALID
padding, the output height and width are computed as:out_height = ceil(float(in_height - filter_height + 1) / float(strides1))
out_width = ceil(float(in_width - filter_width + 1) / float(strides[2]))
阅读全文
0 0
- tensorflow中padding的两种类型对比
- Tensorflow中padding的两种类型SAME和VALID
- Tensorflow中padding的两种类型SAME和VALID
- Tensorflow中padding的两种类型SAME和VALID
- Tensorflow中padding的两种类型SAME和VALID
- Tensorflow中padding的两种类型SAME和VALID
- Tensorflow中padding的两种类型SAME和VALID
- tensorflow中nn的padding
- TensorFlow中CNN的两种padding方式“SAME”和“VALID”
- TensorFlow中CNN的两种padding方式“SAME”和“VALID”
- Tensorflow的padding操作
- 两种类型的注释
- 两种类型的员工
- Cookie的两种类型
- dstream的两种类型
- VS2005中资源上下文两种类型的区别
- unity3d中网格导入文件的两种类型
- 浅析JavaScript中两种类型的全局对象/函数
- java11——流程控制练习题
- iOS 控制器父子关系的建立原则
- 欢迎使用CSDN-markdown编辑器
- ZooKeeper——Curator客户端基本使用(笔记)
- 6基础知识笔记二
- tensorflow中padding的两种类型对比
- C++模板 http://www.cnblogs.com/assemble8086/archive/2011/10/02/2198308.html
- JSON
- 打包jar读取配置文件
- 化构MIDAS NFX.2017.R1.20161104.Win32_64-ISO 1DVD
- 【bzoj1391】[Ceoi2008]order
- SpringAOP的实现原理
- 一种公认提供toString的方法_JAVA核心技术卷轴Ⅰ
- 隐写术