提交 d537addb authored 作者: Frederic's avatar Frederic

Deactivate merge of assert as it cause cycle in the graph

上级 856aa0b6
......@@ -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
......
......@@ -362,7 +362,7 @@ class TestMergeOptimizer:
strg = str(g)
assert strg == '[Op1(y, y)]' or strg == '[Op1(z, z)]'
def test_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 test_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 test_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 test_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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论