Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
05b28f19
提交
05b28f19
authored
2月 03, 2011
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Whitespace autofix.
上级
bde405d6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
6 行增加
和
7 行删除
+6
-7
test_function_module.py
theano/compile/tests/test_function_module.py
+6
-7
没有找到文件。
theano/compile/tests/test_function_module.py
浏览文件 @
05b28f19
...
...
@@ -46,7 +46,7 @@ class T_function(unittest.TestCase):
x
,
s
=
T
.
scalars
(
'xs'
)
fn
=
function
([
x
],
[
x
])
self
.
failUnlessRaises
(
TypeError
,
fn
,
1
,
2
)
def
test_missing_inputs
(
self
):
MissingInputException
=
TypeError
...
...
@@ -185,7 +185,7 @@ class T_function(unittest.TestCase):
def
test_weird_names
(
self
):
a
,
x
,
s
=
T
.
scalars
(
'xxx'
)
checkfor
(
self
,
lambda
:
function
([
In
(
a
,
name
=
[])],[]),
TypeError
)
def
t
():
...
...
@@ -291,7 +291,7 @@ class T_function(unittest.TestCase):
"""
a
=
T
.
dmatrix
()
aval
=
numpy
.
random
.
rand
(
3
,
3
)
# when borrow=False, test that a destroy map cannot alias output to input
f
=
theano
.
function
([
In
(
a
,
borrow
=
False
)],
Out
(
a
+
1
,
borrow
=
True
))
assert
numpy
.
all
(
f
(
aval
)
==
aval
+
1
)
...
...
@@ -448,7 +448,7 @@ class T_picklefunction(unittest.TestCase):
config
.
mode
=
old_default_mode
config
.
optimizer
=
old_default_opt
config
.
linker
=
old_default_link
if
g
==
'ok'
:
return
...
...
@@ -541,7 +541,7 @@ class T_picklefunction(unittest.TestCase):
def
test_pickle_class_with_functions
(
self
):
blah
=
SomethingToPickle
()
assert
blah
.
f2
.
container
[
blah
.
s
]
.
storage
is
blah
.
f1
.
container
[
blah
.
s
]
.
storage
assert
blah
.
f2
.
container
[
blah
.
s
]
.
storage
is
blah
.
f1
.
container
[
blah
.
s
]
.
storage
try
:
blah2
=
copy
.
deepcopy
(
blah
)
...
...
@@ -551,7 +551,7 @@ class T_picklefunction(unittest.TestCase):
else
:
raise
assert
blah2
.
f2
.
container
[
blah2
.
s
]
.
storage
is
blah2
.
f1
.
container
[
blah2
.
s
]
.
storage
assert
blah2
.
f2
.
container
[
blah2
.
s
]
.
storage
is
blah2
.
f1
.
container
[
blah2
.
s
]
.
storage
assert
blah
.
f1
[
blah
.
s
]
==
blah2
.
f1
[
blah2
.
s
]
...
...
@@ -599,4 +599,3 @@ if __name__ == '__main__':
assert
b
t
.
failUnless
=
fu
t
.
test_deepcopy_shared_container
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论