提交 cde0a6f5 authored 作者: Reyhane Askari's avatar Reyhane Askari

minor changes in fast_destroy

上级 0e4b2ea8
...@@ -817,14 +817,16 @@ class DestroyHandler(toolbox.Bookkeeper): # noqa ...@@ -817,14 +817,16 @@ class DestroyHandler(toolbox.Bookkeeper): # noqa
if len(v) > 0: if len(v) > 0:
self.fail_validate[app] = theano.gof.InconsistencyError( self.fail_validate[app] = theano.gof.InconsistencyError(
"Destroyed variable has view_map. " + str(reason)) "Destroyed variable has view_map. " + str(reason))
elif d: elif d:
d = d.get(inp_idx2, []) d = d.get(inp_idx2, [])
if len(d) > 0: if len(d) > 0:
self.fail_validate[app] = theano.gof.InconsistencyError( self.fail_validate[app] = theano.gof.InconsistencyError(
"Destroyed variable has destroy_map. " + str(reason)) "Destroyed variable has destroy_map. " + str(reason))
assert len(v) <= 1 # The 2 assertions are commented since this function is called so many times
assert len(d) <= 1 # but they should be true.
# assert len(v) <= 1
# assert len(d) <= 1
def on_import(self, fgraph, app, reason): def on_import(self, fgraph, app, reason):
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论