Theano conv2d的border_mode
来源:互联网 发布:设计网络营销策划方案 编辑:程序博客网 时间:2024/05/17 12:50
文档是这么写的:
border_mode: str, int or tuple of two int Either of the following: ``'valid'``: apply filter wherever it completely overlaps with the input. Generates output of shape: input shape - filter shape + 1 ``'full'``: apply filter wherever it partly overlaps with the input. Generates output of shape: input shape + filter shape - 1 ``'half'``: pad input with a symmetric border of ``filter rows // 2`` rows and ``filter columns // 2`` columns, then perform a valid convolution. For filters with an odd number of rows and columns, this leads to the output shape being equal to the input shape. ``int``: pad input with a symmetric border of zeros of the given width, then perform a valid convolution. ``(int1, int2)``: pad input with a symmetric border of ``int1`` rows and ``int2`` columns, then perform a valid convolution.
首先, 这几种模式对应的padding都是zero-padding.
int, (int1, int2)
: 它们最容易理解的: 手动指定行和列方向上的padding数量.valid
: 其实就是不padding, 即\(border\_mode = (0, 0)\)full
: 它的padding为:\(border\_mode=(k_h-1, k_w-1)\), 其中\(k\)为kernel的行数(高)与列数(宽). 若\(k_h=k_w=3\), conv操作会全方位覆盖所有的\((3, 3)\), \((3, 1)\), \((2,1)\), \((1, 1)\)区域. 这也是它叫full
的原因.half
: \(border\_mode = (\frac {(k-1)}{2}, \frac{k-1}{2})\). 注意, \(k\)一般都是奇数.full
模式的padding得到的conv输出比输入要大, 而half
的输出形状与输入相同. 也有叫same
的.
- 原始图片来源: https://github.com/vdumoulin/conv_arithmetic
- Reference: http://deeplearning.net/software/theano_versions/dev/tutorial/conv_arithmetic.html
0 0
- Theano conv2d的border_mode
- 对theano中conv2d函数的理解
- theano学习--conv2d
- Theano中conv2d多通道理解
- keras卷积补零相关的border_mode的选择以及padding的操作
- Tensorflow系列——conv2d的用法
- tf.contrib.slim.conv2d ()和tf.nn.conv2d()的使用区别
- Theano的安装
- Theano 库 的安装
- theano做的MLP
- theano的配置过程
- python的Theano库
- 搭建gpu的theano
- theano的scan函数
- theano的简略学习
- theano dimshuffle的使用说明
- theano dimshuffle的使用说明
- Theano的配置
- C++ namespace
- (HDU 5792)World is Exploding <树状数组+去重> 多校训练5
- C/C++的基本数据类型
- VS系列语言包下载提示兼容性或其他问题的解决方法。
- 卷积操作的维度
- Theano conv2d的border_mode
- 线性函数的定义
- 卷积操作的线性性质
- git bash下中文乱码
- iOS-NSURL踩的坑
- UE4 游戏退出蓝图
- Python NaN
- 数组和指针相互之间的联系与调用
- Deconvolution Using Theano