Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e53a24f2
提交
e53a24f2
authored
3月 30, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't test individual versions of GpuConv
上级
0efa1e46
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
203 行删除
+4
-203
test_conv_cuda_ndarray.py
theano/sandbox/gpuarray/tests/test_conv_cuda_ndarray.py
+4
-203
没有找到文件。
theano/sandbox/gpuarray/tests/test_conv_cuda_ndarray.py
浏览文件 @
e53a24f2
...
@@ -400,208 +400,12 @@ def get_valid_shapes():
...
@@ -400,208 +400,12 @@ def get_valid_shapes():
return
shapes
return
shapes
def
test_valid_0_2
():
seed_rng
()
shapes
=
get_valid_shapes
()
version
=
[
0
,
2
]
verbose
=
0
random
=
True
print_
=
False
ones
=
False
if
ones
:
random
=
False
shapes2
=
[]
for
id
,
(
ishape
,
kshape
,
subshape
,
istride
,
kstride
)
in
enumerate
(
shapes
):
oshape
=
[
ishape
[
0
]]
+
[
kshape
[
0
]]
+
list
(
numpy
.
asarray
(
ishape
[
2
:])
-
numpy
.
asarray
(
kshape
[
2
:])
+
numpy
.
asarray
([
1
,
1
]))
if
oshape
[
3
]
>
device_prop
[
'maxThreadsDim0'
]:
continue
if
ishape
[
1
]
>
1
:
continue
if
((
numpy
.
prod
(
ishape
[
2
:])
+
numpy
.
prod
(
kshape
[
2
:]))
*
4
>
(
16
*
1024
-
150
)):
continue
if
subshape
==
(
1
,
1
):
shapes2
.
append
((
ishape
,
kshape
,
subshape
,
istride
,
kstride
))
shapes
=
shapes2
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'valid'
,
print_
=
print_
,
ones
=
ones
,
rtol
=
1.1e-5
)
def
test_valid_1_3_11_12
():
seed_rng
()
shapes
=
get_valid_shapes
()
version
=
[
1
,
3
,
11
,
12
]
verbose
=
0
random
=
True
print_
=
False
ones
=
False
if
ones
:
random
=
False
shapes2
=
[]
for
id
,
(
ishape
,
kshape
,
subshape
,
istride
,
kstride
)
in
enumerate
(
shapes
):
oshape
=
[
ishape
[
0
]]
+
[
kshape
[
0
]]
+
list
(
numpy
.
asarray
(
ishape
[
2
:])
-
numpy
.
asarray
(
kshape
[
2
:])
+
numpy
.
asarray
([
1
,
1
]))
if
oshape
[
3
]
>
device_prop
[
'maxThreadsDim0'
]:
continue
if
((
numpy
.
prod
(
ishape
[
2
:])
+
numpy
.
prod
(
kshape
[
2
:]))
*
4
>
(
16
*
1024
-
150
)):
continue
if
subshape
==
(
1
,
1
):
shapes2
.
append
((
ishape
,
kshape
,
subshape
,
istride
,
kstride
))
shapes
=
shapes2
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'valid'
,
print_
=
print_
,
ones
=
ones
,
rtol
=
1.1e-5
)
def
test_valid_4
():
seed_rng
()
shapes
=
get_valid_shapes
()
version
=
[
4
]
verbose
=
0
random
=
True
print_
=
False
ones
=
False
if
ones
:
random
=
False
shapes2
=
[]
for
id
,
(
ishape
,
kshape
,
subshape
,
istride
,
kstride
)
in
enumerate
(
shapes
):
oshape
=
[
ishape
[
0
]]
+
[
kshape
[
0
]]
+
list
(
numpy
.
asarray
(
ishape
[
2
:])
-
numpy
.
asarray
(
kshape
[
2
:])
+
numpy
.
asarray
([
1
,
1
]))
if
oshape
[
3
]
>
device_prop
[
'maxThreadsDim0'
]:
continue
if
ishape
[
1
]
>
1
:
continue
if
((
kshape
[
2
]
*
ishape
[
3
]
*
4
+
numpy
.
prod
(
kshape
[
2
:])
*
4
)
>
(
16
*
1024
-
150
)):
continue
if
subshape
==
(
1
,
1
):
shapes2
.
append
((
ishape
,
kshape
,
subshape
,
istride
,
kstride
))
shapes
=
shapes2
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'valid'
,
print_
=
print_
,
ones
=
ones
,
rtol
=
1.1e-5
)
def
test_valid_5
():
seed_rng
()
shapes
=
get_valid_shapes
()
version
=
[
5
]
verbose
=
0
random
=
True
print_
=
False
ones
=
False
if
ones
:
random
=
False
shapes2
=
[]
# print len(shapes)
for
id
,
(
ishape
,
kshape
,
subshape
,
istride
,
kstride
)
in
enumerate
(
shapes
):
oshape
=
[
ishape
[
0
]]
+
[
kshape
[
0
]]
+
list
(
numpy
.
asarray
(
ishape
[
2
:])
-
numpy
.
asarray
(
kshape
[
2
:])
+
numpy
.
asarray
([
1
,
1
]))
if
oshape
[
3
]
>
device_prop
[
'maxThreadsDim0'
]:
continue
if
((
kshape
[
2
]
*
ishape
[
3
]
*
4
+
numpy
.
prod
(
kshape
[
2
:])
*
4
)
>
(
16
*
1024
-
150
)):
continue
if
subshape
==
(
1
,
1
):
shapes2
.
append
((
ishape
,
kshape
,
subshape
,
istride
,
kstride
))
shapes
=
shapes2
# print len(shapes2)
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'valid'
,
print_
=
print_
,
ones
=
ones
,
rtol
=
1.1e-5
)
def
test_valid_7_8_13
():
seed_rng
()
shapes
=
get_valid_shapes
()
# This is to test the "new" lower shared memory usage.
shapes
.
append
(((
10
,
30
,
60
,
60
),
(
20
,
30
,
40
,
40
),
(
1
,
1
),
(
1
,
1
),
(
1
,
1
)))
version
=
[
7
,
8
,
13
]
verbose
=
0
random
=
True
print_
=
False
ones
=
False
if
ones
:
random
=
False
shapes2
=
[]
# print len(shapes)
for
id
,
(
ishape
,
kshape
,
subshape
,
istride
,
kstride
)
in
enumerate
(
shapes
):
oshape
=
[
ishape
[
0
]]
+
[
kshape
[
0
]]
+
list
(
numpy
.
asarray
(
ishape
[
2
:])
-
numpy
.
asarray
(
kshape
[
2
:])
+
numpy
.
asarray
([
1
,
1
]))
if
oshape
[
2
]
*
oshape
[
3
]
>
device_prop
[
'maxThreadsDim0'
]:
continue
if
max
(
numpy
.
prod
(
ishape
[
2
:])
*
4
+
2
*
kshape
[
3
]
*
4
,
oshape
[
2
]
*
oshape
[
3
]
*
4
*
2
)
>
(
16
*
1024
-
150
):
continue
if
subshape
==
(
1
,
1
):
shapes2
.
append
((
ishape
,
kshape
,
subshape
,
istride
,
kstride
))
shapes
=
shapes2
# print len(shapes2)
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'valid'
,
print_
=
print_
,
ones
=
ones
,
rtol
=
1.1e-5
)
def
test_valid_9_10
():
seed_rng
()
shapes
=
get_valid_shapes
()
version
=
[
9
,
10
]
verbose
=
0
random
=
True
print_
=
False
ones
=
False
if
ones
:
random
=
False
shapes2
=
[]
# print len(shapes)
for
id
,
(
ishape
,
kshape
,
subshape
,
istride
,
kstride
)
in
enumerate
(
shapes
):
oshape
=
[
ishape
[
0
]]
+
[
kshape
[
0
]]
+
list
(
numpy
.
asarray
(
ishape
[
2
:])
-
numpy
.
asarray
(
kshape
[
2
:])
+
numpy
.
asarray
([
1
,
1
]))
if
oshape
[
3
]
>
device_prop
[
'maxThreadsDim0'
]:
continue
if
(
kshape
[
3
]
*
4
+
ishape
[
3
])
>
(
16
*
1024
-
150
):
continue
if
subshape
==
(
1
,
1
):
shapes2
.
append
((
ishape
,
kshape
,
subshape
,
istride
,
kstride
))
shapes
=
shapes2
# print len(shapes2)
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'valid'
,
print_
=
print_
,
ones
=
ones
,
rtol
=
1.1e-5
)
def
test_valid
():
def
test_valid
():
seed_rng
()
seed_rng
()
shapes
=
get_valid_shapes
()
shapes
=
get_valid_shapes
()
# shapes=shapes[400:426]
version
=
[
-
1
]
# I put -1 in case we forget to add version in the test to.
# I put -2 to test the reference version.
version
=
[
-
2
,
-
1
,
6
]
verbose
=
0
verbose
=
0
# version=[1]
random
=
True
random
=
True
print_
=
False
print_
=
False
...
@@ -666,10 +470,8 @@ def test_full():
...
@@ -666,10 +470,8 @@ def test_full():
,
((
2
,
4
,
1050
,
13
),
(
3
,
4
,
10
,
11
),
(
1
,
1
),
(
1
,
1
),
(
1
,
1
))
,
((
2
,
4
,
1050
,
13
),
(
3
,
4
,
10
,
11
),
(
1
,
1
),
(
1
,
1
),
(
1
,
1
))
]
]
# shapes=shapes[:277]
version
=
[
-
1
]
version
=
[
-
2
,
-
1
,
0
,
1
,
2
,
3
,
4
,
5
]
verbose
=
0
verbose
=
0
# version=[4]
random
=
True
random
=
True
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'full'
)
exec_conv
(
version
,
shapes
,
verbose
,
random
,
'full'
)
...
@@ -689,9 +491,8 @@ def test_subsample():
...
@@ -689,9 +491,8 @@ def test_subsample():
shapes
+=
get_shapes2
(
scales_img
=
(
2
,
2
),
subsample
=
(
2
,
1
))
shapes
+=
get_shapes2
(
scales_img
=
(
2
,
2
),
subsample
=
(
2
,
1
))
shapes
+=
get_shapes2
(
scales_img
=
(
2
,
2
),
subsample
=
(
2
,
2
))
shapes
+=
get_shapes2
(
scales_img
=
(
2
,
2
),
subsample
=
(
2
,
2
))
# We put only the version that implement the subsample to make the test faster.
version_valid
=
[
-
1
]
version_valid
=
[
-
2
,
-
1
,
1
,
3
,
11
,
12
]
version_full
=
[
-
1
]
version_full
=
[
-
2
,
-
1
]
verbose
=
0
verbose
=
0
random
=
True
random
=
True
print_
=
False
print_
=
False
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论