Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4577347b
提交
4577347b
authored
7月 16, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
__props__ for theano/compile/tests/test_debugmode.py
上级
c89e1bc2
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
7 行增加
和
24 行删除
+7
-24
test_debugmode.py
theano/compile/tests/test_debugmode.py
+7
-24
没有找到文件。
theano/compile/tests/test_debugmode.py
浏览文件 @
4577347b
...
...
@@ -20,17 +20,13 @@ def test0():
class
BROKEN_ON_PURPOSE_Add
(
gof
.
Op
):
__props__
=
(
"py_offset"
,)
def
__init__
(
self
,
py_offset
):
gof
.
Op
.
__init__
(
self
)
self
.
py_offset
=
py_offset
def
__eq__
(
self
,
other
):
return
(
type
(
self
)
==
type
(
other
)
and
(
self
.
py_offset
==
other
.
py_offset
))
def
__hash__
(
self
):
return
29834
^
hash
(
type
(
self
))
^
hash
(
self
.
py_offset
)
def
make_node
(
self
,
a
,
b
):
a
=
theano
.
tensor
.
as_tensor_variable
(
a
)
b
=
theano
.
tensor
.
as_tensor_variable
(
b
)
...
...
@@ -105,17 +101,12 @@ class WeirdBrokenOp(gof.Op):
In both cases, it does not set the destroy_map or view_map correctly so
it should raise an error in DebugMode.
"""
__props__
=
(
"behaviour"
,
)
def
__init__
(
self
,
behaviour
):
gof
.
Op
.
__init__
(
self
)
self
.
behaviour
=
behaviour
def
__eq__
(
self
,
other
):
return
(
type
(
self
)
==
type
(
other
)
and
(
self
.
behaviour
==
other
.
behaviour
))
def
__hash__
(
self
):
return
hash
(
type
(
self
))
^
hash
(
self
.
behaviour
)
def
make_node
(
self
,
a
):
a_
=
theano
.
tensor
.
as_tensor_variable
(
a
)
r
=
gof
.
Apply
(
self
,
[
a_
],
[
a_
.
type
()])
...
...
@@ -605,11 +596,8 @@ class Test_check_isfinite(unittest.TestCase):
class
BrokenCImplementationAdd
(
gof
.
Op
):
def
__eq__
(
self
,
other
):
return
type
(
self
)
==
type
(
other
)
def
__hash__
(
self
):
return
hash
(
type
(
self
))
__props__
=
()
def
make_node
(
self
,
a
,
b
):
a
=
theano
.
tensor
.
as_tensor_variable
(
a
)
...
...
@@ -703,12 +691,7 @@ class VecAsRowAndCol(gof.Op):
This Op exists to check everything is correct when an Op has
two outputs with different broadcasting patterns.
"""
def
__eq__
(
self
,
other
):
return
type
(
self
)
==
type
(
other
)
def
__hash__
(
self
):
return
hash
(
type
(
self
))
__props__
=
()
def
make_node
(
self
,
v
):
if
not
isinstance
(
v
,
gof
.
Variable
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论