Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
10efa2bf
提交
10efa2bf
authored
1月 17, 2014
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mark some more tests as slow and do some cleanup while there.
上级
151ec94b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
20 行增加
和
17 行删除
+20
-17
test_cc.py
theano/gof/tests/test_cc.py
+10
-2
test_linalg.py
theano/sandbox/linalg/tests/test_linalg.py
+5
-0
test_basic.py
theano/sparse/tests/test_basic.py
+1
-0
test_basic.py
theano/tensor/tests/test_basic.py
+1
-0
test_blas.py
theano/tensor/tests/test_blas.py
+3
-0
test_extra_ops.py
theano/tensor/tests/test_extra_ops.py
+0
-15
没有找到文件。
theano/gof/tests/test_cc.py
浏览文件 @
10efa2bf
...
...
@@ -2,6 +2,7 @@
import
unittest
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
import
theano
from
theano.gof.link
import
PerformLinker
...
...
@@ -191,6 +192,7 @@ def test_clinker_straightforward():
assert
fn
(
2.0
,
2.0
,
2.0
)
==
2.0
@attr
(
'slow'
)
def
test_clinker_literal_inlining
():
if
not
theano
.
config
.
cxx
:
raise
SkipTest
(
"G++ not available, so we need to skip this test."
)
...
...
@@ -206,6 +208,7 @@ def test_clinker_literal_inlining():
assert
"4.12345678"
in
code
# we expect the number to be inlined
@attr
(
'slow'
)
def
test_clinker_single_node
():
if
not
theano
.
config
.
cxx
:
raise
SkipTest
(
"G++ not available, so we need to skip this test."
)
...
...
@@ -216,6 +219,7 @@ def test_clinker_single_node():
assert
fn
(
2.0
,
7.0
)
==
9
@attr
(
'slow'
)
def
test_clinker_dups
():
if
not
theano
.
config
.
cxx
:
raise
SkipTest
(
"G++ not available, so we need to skip this test."
)
...
...
@@ -228,18 +232,19 @@ def test_clinker_dups():
# note: for now the behavior of fn(2.0, 7.0) is undefined
@attr
(
'slow'
)
def
test_clinker_not_used_inputs
():
if
not
theano
.
config
.
cxx
:
raise
SkipTest
(
"G++ not available, so we need to skip this test."
)
# Testing that
duplicate
inputs are allowed.
# Testing that
unused
inputs are allowed.
x
,
y
,
z
=
inputs
()
e
=
add
(
x
,
y
)
lnk
=
CLinker
()
.
accept
(
Env
([
x
,
y
,
z
],
[
e
]))
fn
=
lnk
.
make_function
()
assert
fn
(
2.0
,
1.5
,
1.0
)
==
3.5
# note: for now the behavior of fn(2.0, 7.0) is undefined
@attr
(
'slow'
)
def
test_clinker_dups_inner
():
if
not
theano
.
config
.
cxx
:
raise
SkipTest
(
"G++ not available, so we need to skip this test."
)
...
...
@@ -255,6 +260,7 @@ def test_clinker_dups_inner():
# Test OpWiseCLinker #
######################
# slow on linux, but near sole test and very central
def
test_opwiseclinker_straightforward
():
x
,
y
,
z
=
inputs
()
e
=
add
(
mul
(
add
(
x
,
y
),
div
(
x
,
y
)),
bad_sub
(
bad_sub
(
x
,
y
),
z
))
...
...
@@ -267,6 +273,7 @@ def test_opwiseclinker_straightforward():
assert
fn
(
2.0
,
2.0
,
2.0
)
==
-
6
@attr
(
'slow'
)
def
test_opwiseclinker_constant
():
x
,
y
,
z
=
inputs
()
x
=
Constant
(
tdouble
,
7.2
,
name
=
'x'
)
...
...
@@ -300,6 +307,7 @@ def test_duallinker_straightforward():
assert
res
==
15.3
@attr
(
'slow'
)
def
test_duallinker_mismatch
():
if
not
theano
.
config
.
cxx
:
raise
SkipTest
(
"G++ not available, so we need to skip this test."
)
...
...
theano/sandbox/linalg/tests/test_linalg.py
浏览文件 @
10efa2bf
...
...
@@ -34,6 +34,7 @@ from theano.sandbox.linalg.ops import (cholesky,
)
from
theano.sandbox.linalg
import
eig
,
eigh
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
def
check_lower_triangular
(
pd
,
ch_f
):
...
...
@@ -93,6 +94,9 @@ def test_cholesky_grad():
rng
,
eps
=
eps
))
# This is possibly redundant since we already have a test for the op
# and its grad above.
@attr
(
'slow'
)
def
test_cholesky_and_cholesky_grad_shape
():
if
not
imported_scipy
:
raise
SkipTest
(
"Scipy needed for the Cholesky op."
)
...
...
@@ -395,6 +399,7 @@ class test_diag(unittest.TestCase):
x
=
rng
.
rand
(
5
,
4
)
.
astype
(
self
.
floatX
)
tensor
.
verify_grad
(
extract_diag
,
[
x
],
rng
=
rng
)
@attr
(
'slow'
)
def
test_extract_diag_empty
(
self
):
c
=
self
.
shared
(
numpy
.
array
([[],
[]],
self
.
floatX
))
f
=
theano
.
function
([],
extract_diag
(
c
),
mode
=
self
.
mode
)
...
...
theano/sparse/tests/test_basic.py
浏览文件 @
10efa2bf
...
...
@@ -2110,6 +2110,7 @@ class CastTester(utt.InferShapeTester):
def
setUp
(
self
):
super
(
CastTester
,
self
)
.
setUp
()
# slow but only test
def
test_cast
(
self
):
for
format
in
sparse
.
sparse_formats
:
for
i_dtype
in
sparse
.
all_dtypes
:
...
...
theano/tensor/tests/test_basic.py
浏览文件 @
10efa2bf
...
...
@@ -1997,6 +1997,7 @@ class TestAlloc(unittest.TestCase):
numpy
.
zeros
(
shp
))
# This is slow for the ('int8', 3) version.
def
test_eye
():
def
check
(
dtype
,
N
,
M_
=
None
,
k
=
0
):
# Theano does not accept None as a tensor.
...
...
theano/tensor/tests/test_blas.py
浏览文件 @
10efa2bf
...
...
@@ -6,6 +6,8 @@ from numpy import (arange, array, common_type, complex64, complex128, float32,
float64
,
newaxis
,
shape
,
transpose
,
zeros
)
from
numpy.testing
import
assert_array_almost_equal
from
nose.plugins.attrib
import
attr
import
theano
import
theano.tensor
as
T
from
theano
import
tensor
,
Param
,
shared
,
config
...
...
@@ -1186,6 +1188,7 @@ class TestGemv(TestCase, unittest_tools.TestOptimizationMixin):
assert
numpy
.
allclose
(
v2
.
get_value
(),
numpy
.
dot
(
m
.
get_value
(),
v1
.
get_value
())
+
v2_orig
)
@attr
(
'slow'
)
def
test_gemv1
(
self
):
self
.
t_gemv1
((
3
,
2
))
self
.
t_gemv1
((
0
,
2
))
...
...
theano/tensor/tests/test_extra_ops.py
浏览文件 @
10efa2bf
...
...
@@ -319,13 +319,6 @@ class TestBartlett(utt.InferShapeTester):
self
.
_compile_and_check
([
x
],
[
self
.
op
(
x
)],
[
1
],
self
.
op_class
)
if
__name__
==
"__main__"
:
t
=
TestBartlett
(
'setUp'
)
t
.
setUp
()
t
.
test_perform
()
t
.
test_infer_shape
()
class
TestFillDiagonal
(
utt
.
InferShapeTester
):
rng
=
numpy
.
random
.
RandomState
(
43
)
...
...
@@ -382,11 +375,3 @@ class TestFillDiagonal(utt.InferShapeTester):
numpy
.
random
.
rand
()],
self
.
op_class
,
warn
=
False
)
if
__name__
==
"__main__"
:
utt
.
unittest
.
main
()
t
=
TestFillDiagonal
(
'setUp'
)
t
.
setUp
()
t
.
test_perform
()
t
.
test_gradient
()
t
.
test_infer_shape
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论