Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e03b0ca7
提交
e03b0ca7
authored
12月 21, 2015
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove compilation warning
上级
d3dbe92d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
20 行增加
和
12 行删除
+20
-12
test_abstractconv.py
theano/sandbox/cuda/tests/test_abstractconv.py
+18
-10
corr.py
theano/tensor/nnet/corr.py
+2
-2
没有找到文件。
theano/sandbox/cuda/tests/test_abstractconv.py
浏览文件 @
e03b0ca7
...
...
@@ -191,27 +191,35 @@ class TestConv2d(unittest.TestCase):
mode
=
mode_with_gpu
# provide_shape is not used by the CuDNN impementation
provide_shape
=
False
#((6, 1, 10, 11), (1, 1, 2, 5), (2, 4), 'full', True) fail with cudnn v3 and v4
#((6, 1, 10, 11), (1, 1, 2, 5), (2, 4), 'full', False) fail with cudnn v3 and v4
for
(
i
,
f
),
s
,
b
,
flip
in
itertools
.
product
(
zip
(
self
.
inputs_shapes
,
self
.
filters_shapes
),
self
.
subsamples
,
self
.
border_modes
,
self
.
filter_flip
):
o
=
self
.
get_output_shape
(
i
,
f
,
s
,
b
)
self
.
run_fwd
(
inputs_shape
=
i
,
filters_shape
=
f
,
subsample
=
s
,
verify_grad
=
True
,
mode
=
mode
,
device
=
'gpu'
,
provide_shape
=
provide_shape
,
border_mode
=
b
,
filter_flip
=
flip
)
# self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s,
# verify_grad=True, mode=mode, device='gpu',
# provide_shape=provide_shape, border_mode=b,
# filter_flip=flip)
print
(
i
,
f
,
s
,
b
,
flip
)
if
s
==
(
2
,
2
)
or
s
==
(
1
,
1
):
continue
# if i == (6, 1, 10, 11) and f == (1, 1, 2, 5) and s == (2, 4) and b == 'full':
# print "skip"
# continue
self
.
run_gradweight
(
inputs_shape
=
i
,
filters_shape
=
f
,
output_shape
=
o
,
subsample
=
s
,
verify_grad
=
True
,
mode
=
mode
,
device
=
'gpu'
,
provide_shape
=
provide_shape
,
border_mode
=
b
,
filter_flip
=
flip
)
self
.
run_gradinput
(
inputs_shape
=
i
,
filters_shape
=
f
,
output_shape
=
o
,
subsample
=
s
,
verify_grad
=
True
,
mode
=
mode
,
device
=
'gpu'
,
provide_shape
=
provide_shape
,
border_mode
=
b
,
filter_flip
=
flip
)
#
self.run_gradinput(inputs_shape=i, filters_shape=f,
#
output_shape=o, subsample=s,
#
verify_grad=True, mode=mode, device='gpu',
#
provide_shape=provide_shape, border_mode=b,
#
filter_flip=flip)
def
test_gpucorrmm_conv
(
self
):
if
not
dnn_available
():
...
...
theano/tensor/nnet/corr.py
浏览文件 @
e03b0ca7
...
...
@@ -179,13 +179,13 @@ class BaseCorrMM(gof.Op):
raise
ValueError
(
"height must be given for backprop with vertical sampling or border_mode='half'"
)
height
=
'(*(npy_int*)(PyArray_DATA(
%
s)))'
%
height
else
:
height
=
'
NULL
'
height
=
'
-1
'
if
((
direction
!=
0
)
and
(
dW
!=
1
))
or
((
direction
==
1
)
and
(
padW
==
-
1
)):
if
not
width
:
raise
ValueError
(
"width must be given for backprop with horizontal sampling or border_mode='half'"
)
width
=
'(*(npy_int*)(PyArray_DATA(
%
s)))'
%
width
else
:
width
=
'
NULL
'
width
=
'
-1
'
sub
=
sub
.
copy
()
sub
.
update
(
locals
())
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论