Tensorflow中padding的两种类型SAME和VALID
来源:互联网 发布:视频制作软件 爱剪辑 编辑:程序博客网 时间:2024/06/06 12:41
按照下面的解释,“SAME”用的比较多。same的含义是:长度除以步长向上取整。
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]))
http://blog.csdn.net/jasonzzj/article/details/53930074
Here, take pooling for example:
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]))
- 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中CNN的两种padding方式“SAME”和“VALID”
- TensorFlow中CNN的两种padding方式“SAME”和“VALID”
- Tensorflow里的padding操作(VALID和SAME两种)
- tensorflow中padding的两种类型对比
- tensorflow:SAME VALID padding
- [AI, 深度学习] tensorflow中padding="SAME"和"VALID"的区别
- 卷积神经网络中same padding 和 valid padding
- tensorflow_conv2d_max_pool卷积池化padding参数为SAME和VALID的区别
- tensorflow中padding方式理解:same与valide
- tf的“SAME”和“VALID”
- tensorflow中nn的padding
- caffe和tensorflow中padding区别
- Linux软件--有道词典与Openyoudao的安装
- C++中explicit关键字的作用
- java基础(二)——流程控制
- 关于webservice的一些事
- An impassioned circulation of affection
- Tensorflow中padding的两种类型SAME和VALID
- Warning:warning: Ignoring InnerClasses attribute for an anonymous inner class (com.yintong.secure.ac
- Python之列表与元组的区别详解
- linux下定时执行任务
- C++2
- 笔记1
- 古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月 后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
- unity代码组件面板
- [ubuntu] 16.04 software闪退处理办法