Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a9f04767
提交
a9f04767
authored
10月 07, 2008
作者:
Olivier Breuleux
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed tests
上级
ff223c73
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
57 行增加
和
66 行删除
+57
-66
test.py
test.py
+11
-19
__init__.py
theano/gof/tests/__init__.py
+0
-0
test_cc.py
theano/gof/tests/test_cc.py
+7
-7
test_destroyhandler.py
theano/gof/tests/test_destroyhandler.py
+9
-9
test_graph.py
theano/gof/tests/test_graph.py
+4
-4
test_link.py
theano/gof/tests/test_link.py
+8
-8
test_op.py
theano/gof/tests/test_op.py
+3
-3
test_opt.py
theano/gof/tests/test_opt.py
+6
-6
test_toolbox.py
theano/gof/tests/test_toolbox.py
+5
-5
test_type.py
theano/gof/tests/test_type.py
+1
-1
__init__.py
theano/scalar/__init__.py
+0
-1
test_gradient.py
theano/tests/test_gradient.py
+3
-3
没有找到文件。
test.py
浏览文件 @
a9f04767
import
unittest
,
os
,
sys
,
traceback
def
test_root_dir
(
debugmode
=
False
):
import
unittest
,
os
,
sys
,
traceback
,
commands
suite
=
None
filenames
=
os
.
listdir
(
'.'
)
for
filename
in
filenames
:
if
filename
[
-
3
:]
==
'.py'
and
filename
[
0
:
5
]
==
'_test'
:
#print >>sys.stderr, 'Loading', modname
modname
=
filename
[
0
:
-
3
]
def
test_module
(
module_path
,
debugmode
=
False
):
files
=
commands
.
getoutput
(
"find
%
s -name test_*.py"
%
module_path
)
suite
=
None
for
file
in
files
.
split
(
"
\n
"
):
try
:
try
:
module
=
__import__
(
modname
)
module
=
__import__
(
file
[:
-
3
]
)
except
Exception
,
e
:
except
Exception
,
e
:
print
>>
sys
.
stderr
,
"===================================================="
print
>>
sys
.
stderr
,
"===================================================="
print
>>
sys
.
stderr
,
"Failed to load
%
s.py"
%
modnam
e
print
>>
sys
.
stderr
,
"Failed to load
%
s"
%
fil
e
print
>>
sys
.
stderr
,
"===================================================="
print
>>
sys
.
stderr
,
"===================================================="
traceback
.
print_exc
()
traceback
.
print_exc
()
print
>>
sys
.
stderr
,
"===================================================="
print
>>
sys
.
stderr
,
"===================================================="
...
@@ -20,7 +18,7 @@ def test_root_dir(debugmode=False):
...
@@ -20,7 +18,7 @@ def test_root_dir(debugmode=False):
tests
=
unittest
.
TestLoader
()
.
loadTestsFromModule
(
module
)
tests
=
unittest
.
TestLoader
()
.
loadTestsFromModule
(
module
)
if
tests
.
countTestCases
()
>
0
:
if
tests
.
countTestCases
()
>
0
:
print
>>
sys
.
stderr
,
'Testing'
,
modnam
e
print
>>
sys
.
stderr
,
'Testing'
,
fil
e
if
suite
is
None
:
if
suite
is
None
:
suite
=
tests
suite
=
tests
else
:
else
:
...
@@ -30,6 +28,7 @@ def test_root_dir(debugmode=False):
...
@@ -30,6 +28,7 @@ def test_root_dir(debugmode=False):
else
:
else
:
unittest
.
TextTestRunner
(
verbosity
=
1
)
.
run
(
suite
)
unittest
.
TextTestRunner
(
verbosity
=
1
)
.
run
(
suite
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
def
printUsage
():
def
printUsage
():
...
@@ -47,13 +46,6 @@ if __name__ == '__main__':
...
@@ -47,13 +46,6 @@ if __name__ == '__main__':
elif
len
(
sys
.
argv
)
>
2
:
elif
len
(
sys
.
argv
)
>
2
:
printUsage
()
printUsage
()
if
len
(
sys
.
argv
)
>=
2
:
test_module
(
"theano"
)
cmd
=
sys
.
argv
[
1
]
else
:
cmd
=
'python'
for
dir
in
'gof compile scalar tensor sparse'
.
split
():
os
.
system
(
'cd
%
s;
%
s autotest.py
%
s'
%
(
dir
,
cmd
,
debugparam
))
test_root_dir
(
debugparam
!=
""
)
theano/gof/tests/__init__.py
0 → 100644
浏览文件 @
a9f04767
theano/gof/
_
test_cc.py
→
theano/gof/
tests/
test_cc.py
浏览文件 @
a9f04767
import
unittest
import
unittest
from
link
import
PerformLinker
,
Profiler
from
theano.gof.
link
import
PerformLinker
,
Profiler
from
cc
import
*
from
theano.gof.
cc
import
*
from
type
import
Type
from
t
heano.gof.t
ype
import
Type
from
graph
import
Result
,
Apply
,
Constant
from
theano.gof.
graph
import
Result
,
Apply
,
Constant
from
op
import
Op
from
theano.gof.
op
import
Op
import
env
from
theano.gof
import
env
import
toolbox
from
theano.gof
import
toolbox
def
as_result
(
x
):
def
as_result
(
x
):
assert
isinstance
(
x
,
Result
)
assert
isinstance
(
x
,
Result
)
...
...
theano/gof/
_
test_destroyhandler.py
→
theano/gof/
tests/
test_destroyhandler.py
浏览文件 @
a9f04767
import
unittest
import
unittest
from
type
import
Type
from
t
heano.gof.t
ype
import
Type
import
graph
from
theano.gof
import
graph
from
graph
import
Result
,
Apply
from
theano.gof.
graph
import
Result
,
Apply
from
op
import
Op
from
theano.gof.
op
import
Op
from
opt
import
*
from
theano.gof.
opt
import
*
import
destroyhandler
from
theano.gof
import
destroyhandler
from
env
import
Env
,
InconsistencyError
from
theano.gof.
env
import
Env
,
InconsistencyError
from
toolbox
import
ReplaceValidate
from
t
heano.gof.t
oolbox
import
ReplaceValidate
from
copy
import
copy
from
copy
import
copy
...
...
theano/gof/
_
test_graph.py
→
theano/gof/
tests/
test_graph.py
浏览文件 @
a9f04767
from
collections
import
deque
from
collections
import
deque
import
unittest
import
unittest
from
graph
import
*
from
theano.gof.
graph
import
*
from
op
import
Op
from
theano.gof.
op
import
Op
from
type
import
Type
from
t
heano.gof.t
ype
import
Type
from
graph
import
Result
from
theano.gof.
graph
import
Result
if
1
:
if
1
:
...
...
theano/gof/
_
test_link.py
→
theano/gof/
tests/
test_link.py
浏览文件 @
a9f04767
...
@@ -2,14 +2,14 @@
...
@@ -2,14 +2,14 @@
import
unittest
import
unittest
import
graph
from
theano.gof
import
graph
from
graph
import
Result
,
Apply
,
Constant
from
theano.gof.
graph
import
Result
,
Apply
,
Constant
from
type
import
Type
from
t
heano.gof.t
ype
import
Type
from
op
import
Op
from
theano.gof.
op
import
Op
import
env
from
theano.gof
import
env
import
toolbox
from
theano.gof
import
toolbox
from
link
import
*
from
theano.gof.
link
import
*
#from _test_result import Double
#from _test_result import Double
...
...
theano/gof/
_
test_op.py
→
theano/gof/
tests/
test_op.py
浏览文件 @
a9f04767
import
unittest
import
unittest
from
copy
import
copy
from
copy
import
copy
from
op
import
*
from
theano.gof.
op
import
*
from
type
import
Type
,
Generic
from
t
heano.gof.t
ype
import
Type
,
Generic
from
graph
import
Apply
,
Result
from
theano.gof.
graph
import
Apply
,
Result
def
as_result
(
x
):
def
as_result
(
x
):
assert
isinstance
(
x
,
Result
)
assert
isinstance
(
x
,
Result
)
...
...
theano/gof/
_
test_opt.py
→
theano/gof/
tests/
test_opt.py
浏览文件 @
a9f04767
import
unittest
import
unittest
from
type
import
Type
from
t
heano.gof.t
ype
import
Type
from
graph
import
Result
,
Apply
,
Constant
from
theano.gof.
graph
import
Result
,
Apply
,
Constant
from
op
import
Op
from
theano.gof.
op
import
Op
from
opt
import
*
from
theano.gof.
opt
import
*
from
env
import
Env
from
theano.gof.
env
import
Env
from
toolbox
import
*
from
t
heano.gof.t
oolbox
import
*
def
as_result
(
x
):
def
as_result
(
x
):
...
...
theano/gof/
_
test_toolbox.py
→
theano/gof/
tests/
test_toolbox.py
浏览文件 @
a9f04767
import
unittest
import
unittest
from
graph
import
Result
,
Apply
from
theano.gof.
graph
import
Result
,
Apply
from
type
import
Type
from
t
heano.gof.t
ype
import
Type
from
op
import
Op
from
theano.gof.
op
import
Op
from
env
import
Env
,
InconsistencyError
from
theano.gof.
env
import
Env
,
InconsistencyError
from
toolbox
import
*
from
t
heano.gof.t
oolbox
import
*
def
as_result
(
x
):
def
as_result
(
x
):
...
...
theano/gof/
_
test_type.py
→
theano/gof/
tests/
test_type.py
浏览文件 @
a9f04767
import
unittest
import
unittest
from
type
import
*
from
t
heano.gof.t
ype
import
*
# todo: test generic
# todo: test generic
...
...
theano/scalar/__init__.py
浏览文件 @
a9f04767
...
@@ -2,5 +2,4 @@
...
@@ -2,5 +2,4 @@
from
basic
import
*
from
basic
import
*
from
basic
import
_abs
from
basic
import
_abs
import
opt
theano/tests/test_gradient.py
浏览文件 @
a9f04767
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
#
#
import
unittest
import
unittest
import
numpy
import
numpy
import
gof
from
theano
import
gof
from
gradient
import
*
from
theano.
gradient
import
*
import
gradient
from
theano
import
gradient
class
_test_grad_sources_inputs
(
unittest
.
TestCase
):
class
_test_grad_sources_inputs
(
unittest
.
TestCase
):
def
test_retNone1
(
self
):
def
test_retNone1
(
self
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论