Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
38f81746
提交
38f81746
authored
8月 23, 2012
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added docstring for internal parameter of conv2d.
上级
1ebe9fd6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
5 行删除
+17
-5
conv.py
theano/tensor/nnet/conv.py
+17
-5
没有找到文件。
theano/tensor/nnet/conv.py
浏览文件 @
38f81746
...
@@ -321,9 +321,21 @@ class ConvOp(Op):
...
@@ -321,9 +321,21 @@ class ConvOp(Op):
:type version: int
:type version: int
:param version: passed to GpuConv
:param version: passed to GpuConv
:param imshp_logical: used internally when we generate the gradient when dx!=1 or dy!=1
The 3 following parameters are used internally when we generate
:param kshp_logical: idem
the gradient when dx!=1 or dy!=1.
:param kshp_logical_top_aligned: idem
:param imshp_logical: Default None. None value is equivalent to imshp
value. When imshp_logical != imshp, it tell we need to insert 0 in
the image before we do the convolution. For example, when dx==dy==2
and the image is [[1, 2], [3, 4]], we should make as if the image
was [[1, 0, 2, 0], [0, 0, 0, 0], [3, 0, 4, 0], [0, 0, 0, 0]].
Our python code insert the zero, but the c code optimize it.
imshp_logical != imshp when taking the grad again the weights or
the image when the output_mode is full and `dx != 1` or `dy != 1`.
:param kshp_logical: idem but for kshp and used for the grad again the
weights when the output_mode is valid and `dx != 1` or `dy != 1`.
:param kshp_logical_top_aligned: Used in the same case.Default to True.
Set to False in the grad again the weight when the
output_mode is full.
"""
"""
# We must continue to consider None as 1 for backward compatibility.
# We must continue to consider None as 1 for backward compatibility.
if
dx
is
None
:
if
dx
is
None
:
...
@@ -382,8 +394,8 @@ class ConvOp(Op):
...
@@ -382,8 +394,8 @@ class ConvOp(Op):
self
.
imshp_logical
=
self
.
imshp
self
.
imshp_logical
=
self
.
imshp
if
imshp_logical
is
not
None
:
if
imshp_logical
is
not
None
:
self
.
imshp_logical
=
tuple
(
imshp_logical
)
self
.
imshp_logical
=
tuple
(
imshp_logical
)
assert
(
self
.
imshp
is
None
and
self
.
imshp_logical
is
None
)
or
\
assert
(
(
self
.
imshp
is
None
and
self
.
imshp_logical
is
None
)
or
(
len
(
self
.
imshp
)
==
len
(
self
.
imshp_logical
))
(
len
(
self
.
imshp
)
==
len
(
self
.
imshp_logical
)
))
# a pair
# a pair
self
.
kshp_logical
=
self
.
kshp
self
.
kshp_logical
=
self
.
kshp
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论