提交 58ff3fca authored 作者: Frederic Bastien's avatar Frederic Bastien 提交者: Frederic

Add an assert, it fail if the post_condition aren't respected: that the remove…

Add an assert, it fail if the post_condition aren't respected: that the remove constant and not used inputs is run before the save mem scan opt.
上级 926c5775
......@@ -904,6 +904,8 @@ class ScanSaveMem(gof.Optimizer):
nw_inputs[offset + idx].owner.op.idx_list[0],
slice)):
assert isinstance(nw_inputs[offset + idx].owner.op,
tensor.IncSubtensor)
_nw_input = nw_inputs[offset + idx].owner.inputs[1]
cval = tensor.as_tensor_variable(val)
initl = tensor.as_tensor_variable(init_l[i])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论