Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
865ea186
提交
865ea186
authored
9月 23, 2015
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3434 from nouiz/nose
Don't crash with old nosetests
上级
32105241
81e6b180
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
33 行增加
和
26 行删除
+33
-26
test_linalg.py
theano/sandbox/linalg/tests/test_linalg.py
+1
-1
test_rng_mrg.py
theano/sandbox/tests/test_rng_mrg.py
+6
-5
test_scan.py
theano/scan_module/tests/test_scan.py
+1
-1
test_sp.py
theano/sparse/sandbox/test_sp.py
+1
-1
test_basic.py
theano/sparse/tests/test_basic.py
+1
-1
test_conv.py
theano/tensor/nnet/tests/test_conv.py
+1
-1
test_conv3d.py
theano/tensor/nnet/tests/test_conv3d.py
+1
-1
test_basic.py
theano/tensor/tests/test_basic.py
+1
-1
test_blas.py
theano/tensor/tests/test_blas.py
+1
-1
test_elemwise.py
theano/tensor/tests/test_elemwise.py
+3
-4
test_extra_ops.py
theano/tensor/tests/test_extra_ops.py
+3
-3
test_keepdims.py
theano/tensor/tests/test_keepdims.py
+1
-1
test_nlinalg.py
theano/tensor/tests/test_nlinalg.py
+1
-1
test_opt.py
theano/tensor/tests/test_opt.py
+1
-1
test_slinalg.py
theano/tensor/tests/test_slinalg.py
+1
-2
test_subtensor.py
theano/tensor/tests/test_subtensor.py
+1
-1
unittest_tools.py
theano/tests/unittest_tools.py
+8
-0
没有找到文件。
theano/sandbox/linalg/tests/test_linalg.py
浏览文件 @
865ea186
...
...
@@ -42,8 +42,8 @@ from theano.sandbox.linalg.ops import (cholesky,
)
from
theano.sandbox.linalg
import
eig
,
eigh
,
eigvalsh
from
theano.tests.unittest_tools
import
attr
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
assert_raises
...
...
theano/sandbox/tests/test_rng_mrg.py
浏览文件 @
865ea186
from
__future__
import
print_function
import
copy
import
os
import
sys
import
time
import
copy
import
unittest
from
nose.plugins.skip
import
SkipTest
from
nose.tools
import
assert_raises
import
numpy
from
six.moves
import
xrange
import
theano
from
theano
import
tensor
,
config
from
theano.sandbox
import
rng_mrg
...
...
@@ -15,11 +19,8 @@ from theano.sandbox.cuda import cuda_available
if
cuda_available
:
from
theano.sandbox.cuda
import
float32_shared_constructor
import
unittest
from
theano.tests
import
unittest_tools
as
utt
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
assert_raises
from
theano.tests.unittest_tools
import
attr
# TODO: test gpu
# Done in test_consistency_GPU_{serial,parallel}
...
...
theano/scan_module/tests/test_scan.py
浏览文件 @
865ea186
...
...
@@ -11,7 +11,6 @@ import six.moves.cPickle as pickle
from
six.moves
import
xrange
import
numpy
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
assert_raises
from
nose.tools
import
raises
from
numpy.testing
import
dec
...
...
@@ -24,6 +23,7 @@ from theano.tests import unittest_tools as utt
import
theano.scalar.sharedvar
from
theano.scan_module.scan_op
import
Scan
from
theano.compat
import
PY3
,
OrderedDict
from
theano.tests.unittest_tools
import
attr
'''
...
...
theano/sparse/sandbox/test_sp.py
浏览文件 @
865ea186
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
import
sys
import
time
import
unittest
...
...
@@ -22,6 +21,7 @@ from theano.sparse.tests.test_basic import random_lil
from
theano.tests
import
unittest_tools
as
utt
from
theano.sparse
import
verify_grad_sparse
from
theano.sparse.tests.test_basic
import
sparse_random_inputs
from
theano.tests.unittest_tools
import
attr
class
TestSP
(
unittest
.
TestCase
):
...
...
theano/sparse/tests/test_basic.py
浏览文件 @
865ea186
...
...
@@ -2,7 +2,6 @@ from itertools import product
import
time
import
unittest
from
nose.plugins.attrib
import
attr
from
nose.plugins.skip
import
SkipTest
import
numpy
from
six.moves
import
xrange
...
...
@@ -19,6 +18,7 @@ from theano import sparse
from
theano
import
compile
,
config
,
gof
from
theano.sparse
import
enable_sparse
from
theano.tensor.basic
import
_allclose
from
theano.tests.unittest_tools
import
attr
if
not
enable_sparse
:
raise
SkipTest
(
'Optional package SciPy not installed'
)
...
...
theano/tensor/nnet/tests/test_conv.py
浏览文件 @
865ea186
...
...
@@ -2,7 +2,6 @@ from __future__ import print_function
import
time
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
import
numpy
import
theano
...
...
@@ -10,6 +9,7 @@ import theano.tensor as T
from
theano.tests
import
unittest_tools
as
utt
from
theano.tensor.nnet
import
conv
from
theano.tensor.basic
import
_allclose
,
NotScalarConstantError
from
theano.tests.unittest_tools
import
attr
class
TestConv2D
(
utt
.
InferShapeTester
):
...
...
theano/tensor/nnet/tests/test_conv3d.py
浏览文件 @
865ea186
...
...
@@ -7,6 +7,7 @@ from theano.tests import unittest_tools as utt
from
theano.tensor.nnet.ConvTransp3D
import
convTransp3D
,
ConvTransp3D
from
theano.tensor.nnet.ConvGrad3D
import
convGrad3D
,
ConvGrad3D
from
theano.tensor.nnet.Conv3D
import
conv3D
,
Conv3D
from
theano.tests.unittest_tools
import
attr
import
numpy
as
N
from
six.moves
import
xrange
import
copy
...
...
@@ -14,7 +15,6 @@ import theano.sparse
if
theano
.
sparse
.
enable_sparse
:
from
scipy
import
sparse
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
floatX
=
theano
.
config
.
floatX
...
...
theano/tensor/tests/test_basic.py
浏览文件 @
865ea186
...
...
@@ -15,7 +15,6 @@ from six.moves import xrange
from
six.moves.builtins
import
min
as
builtin_min
from
nose.tools
import
assert_raises
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
import
numpy
from
numpy.testing
import
dec
,
assert_array_equal
,
assert_allclose
from
distutils.version
import
LooseVersion
...
...
@@ -52,6 +51,7 @@ from theano.tensor import (_shared, wvector, bvector, autocast_float_as,
)
from
theano.tests
import
unittest_tools
as
utt
from
theano.tests.unittest_tools
import
attr
imported_scipy_special
=
False
...
...
theano/tensor/tests/test_blas.py
浏览文件 @
865ea186
...
...
@@ -8,7 +8,6 @@ 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
from
six.moves
import
xrange
import
theano
...
...
@@ -25,6 +24,7 @@ from theano.tests import unittest_tools
from
.test_basic
import
(
as_tensor_variable
,
inplace_func
,
compile
,
inplace
)
import
theano.tensor.blas_scipy
from
theano.tests.unittest_tools
import
attr
if
config
.
mode
==
'FAST_COMPILE'
:
...
...
theano/tensor/tests/test_elemwise.py
浏览文件 @
865ea186
import
six.moves.cPickle
as
pickle
from
copy
import
copy
import
unittest
import
math
import
numpy
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
raises
from
six.moves
import
xrange
import
six.moves.cPickle
as
pickle
import
theano
from
theano.compat
import
imap
...
...
@@ -19,7 +18,7 @@ from theano.compile.mode import get_default_mode
from
theano.tensor.elemwise
import
(
CAReduce
,
Elemwise
,
DimShuffle
,
Prod
,
ProdWithoutZeros
)
from
theano.tests
import
unittest_tools
import
math
from
theano.tests.unittest_tools
import
attr
def
FunctionGraph
(
i
,
o
):
...
...
theano/tensor/tests/test_extra_ops.py
浏览文件 @
865ea186
from
nose.plugins.attrib
import
attr
import
unittest
import
numpy
as
np
import
numpy
import
unittest
import
theano
from
theano.tests
import
unittest_tools
as
utt
...
...
@@ -14,7 +14,7 @@ from theano.tensor.extra_ops import (CumsumOp, cumsum, CumprodOp, cumprod,
to_one_hot
,
Unique
)
from
theano
import
tensor
as
T
from
theano
import
config
,
tensor
,
function
from
theano.tests.unittest_tools
import
attr
numpy_ver
=
[
int
(
n
)
for
n
in
numpy
.
__version__
.
split
(
'.'
)[:
2
]]
numpy_16
=
bool
(
numpy_ver
>=
[
1
,
6
])
...
...
theano/tensor/tests/test_keepdims.py
浏览文件 @
865ea186
import
unittest
from
nose.plugins.attrib
import
attr
import
numpy
import
theano
from
theano
import
tensor
,
function
from
theano.tests.unittest_tools
import
attr
# this tests other ops to ensure they keep the dimensions of their
...
...
theano/tensor/tests/test_nlinalg.py
浏览文件 @
865ea186
...
...
@@ -38,9 +38,9 @@ from theano.tensor.nlinalg import ( MatrixInverse,
norm
,
svd
)
from
nose.plugins.attrib
import
attr
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
assert_raises
...
...
theano/tensor/tests/test_opt.py
浏览文件 @
865ea186
...
...
@@ -12,7 +12,6 @@ import unittest
import
numpy
from
six.moves
import
xrange
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
assert_raises
from
numpy.testing
import
dec
from
numpy.testing.noseclasses
import
KnownFailureTest
...
...
@@ -60,6 +59,7 @@ from theano.tensor.elemwise import DimShuffle
from
theano.tests
import
unittest_tools
as
utt
from
theano.compile.mode
import
optdb
from
theano.compile
import
Mode
from
nose.plugins.attrib
import
attr
mode_opt
=
theano
.
config
.
mode
if
mode_opt
==
'FAST_COMPILE'
:
...
...
theano/tensor/tests/test_slinalg.py
浏览文件 @
865ea186
...
...
@@ -12,7 +12,6 @@ from theano.tensor.basic import _allclose
from
theano.tests.test_rop
import
break_op
from
theano.tests
import
unittest_tools
as
utt
from
theano
import
config
from
theano.tensor.slinalg
import
(
Cholesky
,
cholesky
,
CholeskyGrad
,
...
...
@@ -23,9 +22,9 @@ from theano.tensor.slinalg import ( Cholesky,
eigvalsh
,
expm
,
kron
)
from
theano.tests.unittest_tools
import
attr
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
from
nose.tools
import
assert_raises
try
:
...
...
theano/tensor/tests/test_subtensor.py
浏览文件 @
865ea186
...
...
@@ -3,7 +3,6 @@ import sys
import
unittest
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.attrib
import
attr
import
numpy
from
six
import
StringIO
from
six.moves
import
xrange
...
...
@@ -34,6 +33,7 @@ from theano.tensor import (as_tensor_variable, _shared,
fmatrix
,
dmatrix
,
lmatrix
,
matrix
,
ctensor3
,
dtensor4
)
from
theano.tensor.tests.test_basic
import
rand
,
randint_ranged
,
inplace_func
from
theano.tests.unittest_tools
import
attr
if
PY3
:
def
L
(
i
):
...
...
theano/tests/unittest_tools.py
浏览文件 @
865ea186
...
...
@@ -6,6 +6,14 @@ from six.moves import StringIO
import
sys
import
unittest
try
:
from
nose.plugins.attrib
import
attr
except
ImportError
:
# This is an old version of nose
def
attr
(
tag
):
def
func
(
f
):
return
f
return
func
import
numpy
import
theano
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论