Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
fba43e24
提交
fba43e24
authored
8月 16, 2016
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Slight refactor of conv3d2d tests
That way it can work with @parameterized and GPU
上级
65a5c2d4
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
3 行删除
+15
-3
test_tensor_op.py
theano/sandbox/cuda/tests/test_tensor_op.py
+6
-2
test_conv3d2d.py
theano/tensor/nnet/tests/test_conv3d2d.py
+9
-1
没有找到文件。
theano/sandbox/cuda/tests/test_tensor_op.py
浏览文件 @
fba43e24
...
@@ -3,12 +3,14 @@ This file test tensor op that should also operate on CudaNdaray.
...
@@ -3,12 +3,14 @@ This file test tensor op that should also operate on CudaNdaray.
"""
"""
from
__future__
import
absolute_import
,
print_function
,
division
from
__future__
import
absolute_import
,
print_function
,
division
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.skip
import
SkipTest
from
nose_parameterized
import
parameterized
import
numpy
import
numpy
import
theano
import
theano
from
theano
import
tensor
from
theano
import
tensor
import
theano.tensor
as
T
import
theano.tensor
as
T
import
theano.tests.unittest_tools
as
utt
# Skip test if cuda_ndarray is not available.
# Skip test if cuda_ndarray is not available.
import
theano.sandbox.cuda
as
cuda
import
theano.sandbox.cuda
as
cuda
...
@@ -139,6 +141,8 @@ def test_get_diagonal_subtensor_view():
...
@@ -139,6 +141,8 @@ def test_get_diagonal_subtensor_view():
test_conv3d2d
.
test_get_diagonal_subtensor_view
(
wrap
=
cuda
.
CudaNdarray
)
test_conv3d2d
.
test_get_diagonal_subtensor_view
(
wrap
=
cuda
.
CudaNdarray
)
def
test_conv3d
():
@parameterized.expand
((
'valid'
,
'full'
),
utt
.
custom_name_func
)
test_conv3d2d
.
test_conv3d
(
mode
=
mode_with_gpu
,
def
test_conv3d
(
border_mode
):
test_conv3d2d
.
check_conv3d
(
border_mode
=
border_mode
,
mode
=
mode_with_gpu
,
shared
=
cuda
.
shared_constructor
)
shared
=
cuda
.
shared_constructor
)
theano/tensor/nnet/tests/test_conv3d2d.py
浏览文件 @
fba43e24
...
@@ -92,7 +92,15 @@ def check_diagonal_subtensor_view_traces(fn):
...
@@ -92,7 +92,15 @@ def check_diagonal_subtensor_view_traces(fn):
@parameterized.expand
((
'valid'
,
'full'
),
utt
.
custom_name_func
)
@parameterized.expand
((
'valid'
,
'full'
),
utt
.
custom_name_func
)
def
test_conv3d
(
border_mode
,
mode
=
mode_without_gpu
,
shared
=
theano
.
tensor
.
_shared
):
def
test_conv3d
(
border_mode
):
check_conv3d
(
border_mode
=
border_mode
,
mode
=
mode_without_gpu
,
shared
=
theano
.
tensor
.
_shared
)
# This function will also be used in theano/sandbox/cuda/tests/test_tensor_op.py,
# which is not possible if it is decorated by @parameterized.expand
def
check_conv3d
(
border_mode
,
mode
=
mode_without_gpu
,
shared
=
theano
.
tensor
.
_shared
):
if
ndimage
is
None
:
if
ndimage
is
None
:
raise
SkipTest
(
"conv3d2d tests need SciPy"
)
raise
SkipTest
(
"conv3d2d tests need SciPy"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论