Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
993bd3cd
提交
993bd3cd
authored
8月 22, 2017
作者:
affanv14
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add tutorial doc for separable convolutions
上级
99cb1b4e
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
44 行增加
和
0 行删除
+44
-0
conv_arithmetic.txt
doc/tutorial/conv_arithmetic.txt
+44
-0
sep2D.jpg
doc/tutorial/conv_arithmetic_figures/sep2D.jpg
+0
-0
没有找到文件。
doc/tutorial/conv_arithmetic.txt
浏览文件 @
993bd3cd
...
@@ -957,6 +957,7 @@ the final output. A few examples of works using grouped convolutions are `Krizhe
...
@@ -957,6 +957,7 @@ the final output. A few examples of works using grouped convolutions are `Krizhe
A special case of grouped convolutions is when :math:`n` equals the number of input
A special case of grouped convolutions is when :math:`n` equals the number of input
channels. This is called depth-wise convolutions or channel-wise convolutions.
channels. This is called depth-wise convolutions or channel-wise convolutions.
depth-wise convolutions also forms a part of separable convolutions.
An example to use Grouped convolutions would be:
An example to use Grouped convolutions would be:
...
@@ -977,6 +978,49 @@ An example to use Grouped convolutions would be:
...
@@ -977,6 +978,49 @@ An example to use Grouped convolutions would be:
"Aggregated Residual Transformations for Deep Neural Networks".
"Aggregated Residual Transformations for Deep Neural Networks".
arxiv preprint arXiv:1611.05431 (2016).
arxiv preprint arXiv:1611.05431 (2016).
Separable Convolutions
----------------------
Separable convolutions consists of two consecutive convolution operations.
First is depth-wise convolutions which performs convolutions separately for
each channel of the input. The output of this operation is the given as input
to point-wise convolutions which mixes the channels to give the final output.
As we can see from this diagram, modified from `Vanhoucke(2014)`_ [#]_, depth-wise
convolutions is performed with :math:`c2` single channel depth-wise filters
to give a total of :math:`c2` output channels in the intermediate output where
each channel in the input separately performs convolutions with separate kernels
to give :math:`c2 / n` channels to the intermediate output, where :math:`n` is
the number of input channels. The intermediate output then performs point-wise
convolutions with :math:`c3` 1x1 filters which mixes the channels of the intermediate
output to give the final output.
.. image:: conv_arithmetic_figures/sep2D.jpg
:align: center
Separable convolutions is used as follows:
.. code-block:: python
output = theano.tensor.nnet.separable_conv2d(
input, depthwise_filters, pointwise_filters, num_channels = c1,
input_shape=(b, c1, i1, i2), depthwise_filter_shape=(c2, 1, k1, k2),
pointwise_filter_shape=(c3, c2, 1, 1), border_mode=(p1, p2),
subsample=(s1, s2), filter_dilation=(d1, d2))
# output.shape[0] == b
# output.shape[1] == c3
# output.shape[2] == (i1 + 2 * p1 - k1 - (k1 - 1) * (d1 - 1)) // s1 + 1
# output.shape[3] == (i2 + 2 * p2 - k2 - (k2 - 1) * (d2 - 1)) // s2 + 1
.. _Vanhoucke(2014):
http://scholar.google.co.in/scholar_url?url=http://vincent.vanhoucke.com/
publications/vanhoucke-iclr14.pdf&hl=en&sa=X&scisig=AAGBfm0x0bgnudAqSVgZ
ALfu8uPjYOIWwQ&nossl=1&oi=scholarr&ved=0ahUKEwjLreLjr_DVAhULwI8KHWmHAM8QgAMIJigAMAA
.. [#] Vincent Vanhoucke. "Learning Visual Representations at Scale",
International Conference on Learning Representations(2014).
Quick reference
Quick reference
===============
===============
...
...
doc/tutorial/conv_arithmetic_figures/sep2D.jpg
0 → 100644
浏览文件 @
993bd3cd
44.1 KB
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论