Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
87f8c5a1
提交
87f8c5a1
authored
8月 31, 2015
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3344 from nouiz/cycle
Deactivate merge of assert as it cause cycle in the graph
上级
ca8d85de
d537addb
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
5 行删除
+6
-5
opt.py
theano/gof/opt.py
+2
-1
test_opt.py
theano/gof/tests/test_opt.py
+4
-4
没有找到文件。
theano/gof/opt.py
浏览文件 @
87f8c5a1
...
...
@@ -575,7 +575,8 @@ class MergeFeature(object):
if
c
in
self
.
nodes_seen
]
# Put all clients of Assert inputs (if exist) into merge_candidates
for
i
in
node
.
inputs
:
# TODO: Deactivated for now as this cause cycle in the graph.
for
i
in
[]:
# node.inputs:
if
i
.
owner
and
isinstance
(
i
.
owner
.
op
,
theano
.
tensor
.
opt
.
Assert
):
node_has_assert
=
True
...
...
theano/gof/tests/test_opt.py
浏览文件 @
87f8c5a1
...
...
@@ -362,7 +362,7 @@ class TestMergeOptimizer:
strg
=
str
(
g
)
assert
strg
==
'[Op1(y, y)]'
or
strg
==
'[Op1(z, z)]'
def
t
est_one_assert_merge
(
self
):
def
est_one_assert_merge
(
self
):
# Merge two nodes, one has assert, the other not.
x1
=
T
.
matrix
(
'x1'
)
x2
=
T
.
matrix
(
'x2'
)
...
...
@@ -383,7 +383,7 @@ class TestMergeOptimizer:
'''
assert
strg
==
strref
,
(
strg
,
strref
)
def
t
est_both_assert_merge_1
(
self
):
def
est_both_assert_merge_1
(
self
):
# Merge two nodes, both have assert on the same node
# with different conditions.
x1
=
T
.
matrix
(
'x1'
)
...
...
@@ -427,7 +427,7 @@ class TestMergeOptimizer:
# print(strg)
assert
strg
==
strref1
or
strg
==
strref2
,
(
strg
,
strref1
,
strref2
)
def
t
est_both_assert_merge_2
(
self
):
def
est_both_assert_merge_2
(
self
):
# Merge two nodes, both have assert on different node
x1
=
T
.
matrix
(
'x1'
)
x2
=
T
.
matrix
(
'x2'
)
...
...
@@ -456,7 +456,7 @@ class TestMergeOptimizer:
# print(strg)
assert
strg
==
strref
,
(
strg
,
strref
)
def
t
est_both_assert_merge_2_reverse
(
self
):
def
est_both_assert_merge_2_reverse
(
self
):
# Test case "test_both_assert_merge_2" but in reverse order
x1
=
T
.
matrix
(
'x1'
)
x2
=
T
.
matrix
(
'x2'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论