Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
ff91168e
提交
ff91168e
authored
3月 23, 2016
作者:
Mathieu Germain
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added nose_parameterized dependency
上级
35c8fdf1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
1 行删除
+15
-1
install.txt
doc/install.txt
+1
-1
setup.py
setup.py
+3
-0
unittest_tools.py
theano/tests/unittest_tools.py
+11
-0
没有找到文件。
doc/install.txt
浏览文件 @
ff91168e
...
@@ -49,7 +49,7 @@ instructions below for detailed installation steps):
...
@@ -49,7 +49,7 @@ instructions below for detailed installation steps):
The following libraries and software are optional:
The following libraries and software are optional:
`nose <http://nose.readthedocs.org/en/latest/>`_ >= 1.3.0
`nose <http://nose.readthedocs.org/en/latest/>`_ >= 1.3.0
and `nose-parameterized <https://pypi.python.org/pypi/nose-parameterized/>`_ >= 0.5.0
Recommended, to run Theano's test-suite.
Recommended, to run Theano's test-suite.
`Sphinx <http://sphinx.pocoo.org/>`_ >= 0.5.1, `pygments <http://pygments.org/>`_
`Sphinx <http://sphinx.pocoo.org/>`_ >= 0.5.1, `pygments <http://pygments.org/>`_
...
...
setup.py
浏览文件 @
ff91168e
...
@@ -164,6 +164,9 @@ def do_setup():
...
@@ -164,6 +164,9 @@ def do_setup():
packages
=
find_packages
(),
packages
=
find_packages
(),
# 1.7.0 give too much warning related to numpy.diagonal.
# 1.7.0 give too much warning related to numpy.diagonal.
install_requires
=
[
'numpy>=1.7.1'
,
'scipy>=0.11'
,
'six>=1.9.0'
],
install_requires
=
[
'numpy>=1.7.1'
,
'scipy>=0.11'
,
'six>=1.9.0'
],
extras_require
=
{
'test'
:
[
'nose>=1.3.0'
,
'nose-parameterized>=0.5.0'
]
},
package_data
=
{
package_data
=
{
''
:
[
'*.txt'
,
'*.rst'
,
'*.cu'
,
'*.cuh'
,
'*.c'
,
'*.sh'
,
'*.pkl'
,
''
:
[
'*.txt'
,
'*.rst'
,
'*.cu'
,
'*.cuh'
,
'*.c'
,
'*.sh'
,
'*.pkl'
,
'*.h'
,
'*.cpp'
,
'ChangeLog'
],
'*.h'
,
'*.cpp'
,
'ChangeLog'
],
...
...
theano/tests/unittest_tools.py
浏览文件 @
ff91168e
...
@@ -4,6 +4,7 @@ from functools import wraps
...
@@ -4,6 +4,7 @@ from functools import wraps
import
logging
import
logging
import
sys
import
sys
import
unittest
import
unittest
from
nose_parameterized
import
parameterized
from
six
import
integer_types
from
six
import
integer_types
from
six.moves
import
StringIO
from
six.moves
import
StringIO
...
@@ -31,6 +32,13 @@ except ImportError:
...
@@ -31,6 +32,13 @@ except ImportError:
_logger
=
logging
.
getLogger
(
"theano.tests.unittest_tools"
)
_logger
=
logging
.
getLogger
(
"theano.tests.unittest_tools"
)
def
custom_name_func
(
testcase_func
,
param_num
,
param
):
return
"
%
s_
%
s"
%
(
testcase_func
.
__name__
,
parameterized
.
to_safe_name
(
"_"
.
join
(
str
(
x
)
for
x
in
param
.
args
)),
)
def
fetch_seed
(
pseed
=
None
):
def
fetch_seed
(
pseed
=
None
):
"""
"""
Returns the seed to use for running the unit tests.
Returns the seed to use for running the unit tests.
...
@@ -96,6 +104,7 @@ verify_grad.E_grad = T.verify_grad.E_grad
...
@@ -96,6 +104,7 @@ verify_grad.E_grad = T.verify_grad.E_grad
class
TestOptimizationMixin
(
object
):
class
TestOptimizationMixin
(
object
):
def
assertFunctionContains
(
self
,
f
,
op
,
min
=
1
,
max
=
sys
.
maxsize
):
def
assertFunctionContains
(
self
,
f
,
op
,
min
=
1
,
max
=
sys
.
maxsize
):
toposort
=
f
.
maker
.
fgraph
.
toposort
()
toposort
=
f
.
maker
.
fgraph
.
toposort
()
matches
=
[
node
for
node
in
toposort
if
node
.
op
==
op
]
matches
=
[
node
for
node
in
toposort
if
node
.
op
==
op
]
...
@@ -172,6 +181,7 @@ class T_OpContractMixin(object):
...
@@ -172,6 +181,7 @@ class T_OpContractMixin(object):
class
InferShapeTester
(
unittest
.
TestCase
):
class
InferShapeTester
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
seed_rng
()
seed_rng
()
# Take into account any mode that may be defined in a child class
# Take into account any mode that may be defined in a child class
...
@@ -311,6 +321,7 @@ def str_diagnostic(expected, value, rtol, atol):
...
@@ -311,6 +321,7 @@ def str_diagnostic(expected, value, rtol, atol):
class
WrongValue
(
Exception
):
class
WrongValue
(
Exception
):
def
__init__
(
self
,
expected_val
,
val
,
rtol
,
atol
):
def
__init__
(
self
,
expected_val
,
val
,
rtol
,
atol
):
Exception
.
__init__
(
self
)
# to be compatible with python2.4
Exception
.
__init__
(
self
)
# to be compatible with python2.4
self
.
val1
=
expected_val
self
.
val1
=
expected_val
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论