Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
b2f47d62
提交
b2f47d62
authored
5月 12, 2017
作者:
Gabe Schwartz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Proper input shapes for 3D dilated conv tests.
上级
3938ba99
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
6 行删除
+7
-6
dnn.py
theano/gpuarray/dnn.py
+1
-1
test_dnn.py
theano/gpuarray/tests/test_dnn.py
+6
-5
没有找到文件。
theano/gpuarray/dnn.py
浏览文件 @
b2f47d62
...
...
@@ -1121,7 +1121,7 @@ def dnn_conv3d(img, kerns, border_mode='valid', subsample=(1, 1, 1), dilation=(1
conv
=
GpuDnnConvGradW
()(
img
,
kerns
,
out
,
desc
)
return
as_gpuarray_variable
(
conv
.
dimshuffle
(
1
,
0
,
2
,
3
,
4
),
ctx_name
)
elif
(
border_mode
==
'full'
and
subsample
==
(
1
,
1
,
1
)
and
elif
(
border_mode
==
'full'
and
subsample
==
(
1
,
1
,
1
)
and
dilation
==
(
1
,
1
,
1
)
and
direction_hint
!=
'forward!'
):
# Special case: We can be faster by using GpuDnnConvGradI to compute
# the full convolution as the backward pass of a valid convolution.
...
...
theano/gpuarray/tests/test_dnn.py
浏览文件 @
b2f47d62
...
...
@@ -656,17 +656,15 @@ class TestDnnInferShapes(utt.InferShapeTester):
@parameterized.expand
(
product
(
border_modes
,
conv_modes
),
utt
.
custom_name_func
)
def
test_conv3d_none
(
self
,
border_mode
,
conv_mode
):
# CUDNN docs don't say that 3D conv can't handle dilation, but it returns
# CUDNN_STATUS_NOT_SUPPORTED if you try it.
self
.
_test_conv
(
T
.
tensor5
(
'img'
),
T
.
tensor5
(
'kerns'
),
T
.
tensor5
(
'out'
),
np
.
random
.
rand
(
10
,
2
,
6
,
4
,
11
),
np
.
random
.
rand
(
10
,
2
,
15
,
16
,
17
),
np
.
random
.
rand
(
8
,
2
,
4
,
3
,
1
),
border_mode
,
conv_mode
,
[(
1
,
1
,
1
),
(
2
,
2
,
2
)],
[(
1
,
1
,
1
)],
[(
1
,
1
,
1
)
,
(
2
,
2
,
2
)
],
'none'
)
def
_test_conv_gradw
(
self
,
img
,
topgrad
,
kerns
,
img_shape
,
kerns_shape
,
border_mode
,
conv_mode
,
subsamples
,
dilations
):
...
...
@@ -1025,6 +1023,8 @@ def get_conv3d_test_cases():
[(
8
,
4
,
20
,
12
,
15
),
(
5
,
4
,
6
,
12
,
4
),
(
2
,
2
,
2
),
(
1
,
1
,
1
)],
[(
8
,
1
,
20
,
12
,
15
),
(
5
,
1
,
6
,
12
,
4
),
(
3
,
3
,
3
),
(
1
,
1
,
1
)],
[(
8
,
1
,
20
,
12
,
15
),
(
5
,
1
,
6
,
12
,
4
),
(
3
,
2
,
1
),
(
1
,
1
,
1
)],
[(
8
,
1
,
20
,
12
,
15
),
(
5
,
1
,
6
,
3
,
4
),
(
1
,
1
,
2
),
(
3
,
2
,
1
)],
[(
8
,
1
,
20
,
12
,
15
),
(
5
,
1
,
6
,
3
,
4
),
(
2
,
2
,
1
),
(
1
,
2
,
3
)],
# Test with 1x1x1 filters
[(
8
,
1
,
10
,
10
,
10
),
(
10
,
1
,
1
,
1
,
1
),
(
1
,
1
,
1
),
(
1
,
1
,
1
)],
# Test with dimensions larger than 1024 (thread block dim)
...
...
@@ -1042,7 +1042,8 @@ def get_conv3d_test_cases():
test_shapes_full
=
[[(
6
,
2
,
2
,
2
,
2
),
(
4
,
2
,
3
,
1
,
1
),
(
1
,
1
,
1
),
(
1
,
1
,
1
)],
[(
6
,
2
,
2
,
2
,
2
),
(
4
,
2
,
1
,
3
,
1
),
(
1
,
1
,
1
),
(
1
,
1
,
1
)],
[(
6
,
2
,
2
,
2
,
2
),
(
4
,
2
,
1
,
1
,
3
),
(
1
,
1
,
1
),
(
1
,
1
,
1
)],
[(
6
,
2
,
2
,
2
,
2
),
(
4
,
2
,
5
,
5
,
5
),
(
1
,
1
,
1
),
(
1
,
1
,
1
)]]
[(
6
,
2
,
2
,
2
,
2
),
(
4
,
2
,
5
,
5
,
5
),
(
1
,
1
,
1
),
(
1
,
1
,
1
)],
[(
6
,
2
,
2
,
2
,
2
),
(
4
,
2
,
5
,
5
,
5
),
(
1
,
1
,
1
),
(
3
,
2
,
1
)]]
border_modes
=
[
'valid'
,
'full'
,
'half'
,
(
1
,
2
,
3
),
(
3
,
2
,
1
),
1
,
2
]
conv_modes
=
[
'conv'
,
'cross'
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论