提交 5f417aaa authored 作者: Frederic Bastien's avatar Frederic Bastien 提交者: Reyhane Askari

Remove code that isn't used

上级 3e64f75c
...@@ -54,29 +54,6 @@ def _contains_cycle(fgraph, orderings): ...@@ -54,29 +54,6 @@ def _contains_cycle(fgraph, orderings):
True if the graph contains a cycle, False otherwise. True if the graph contains a cycle, False otherwise.
""" """
if False:
import pdb;pdb.set_trace()
for n in fgraph.apply_nodes:
dm = getattr(n.op, 'destroy_map', None)
if not dm:
continue
inputs = sum(dm.values())
for inp_idx in inputs:
inp = n.inputs[inp_idx]
while inp.owner:
if len(inp.clients() > 1):
return True
n2 = inp.owner
inp_idx2 = n2.outputs.index(inp)
d = getattr(n2, 'destroy_map', {}).get(inp_idx2, [])
d += getattr(n2, 'view_map', {}).get(inp_idx2, [])
assert len(d) <= 1
if len(d) == 0:
continue
inp_idx3 = d[0]
inp = n2.inputs[above]
return False
# These are lists of Variable instances # These are lists of Variable instances
outputs = fgraph.outputs outputs = fgraph.outputs
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论