提交 2c1e5f1c authored 作者: Frederic Bastien's avatar Frederic Bastien

allow the flag to remove the assert to work.

上级 47cfeb11
...@@ -775,7 +775,8 @@ def local_alloc_elemwise(node): ...@@ -775,7 +775,8 @@ def local_alloc_elemwise(node):
new.append(new_i) new.append(new_i)
else: new.append(i) else: new.append(i)
new[no_broad_idx]=assert_op new[no_broad_idx]=assert_op
assert assert_op.owner.op is assert_ if theano.config.experimental.local_alloc_elemwise_assert:
assert assert_op.owner.op is assert_
return [node.op(*new)] return [node.op(*new)]
#TODO, global optimizer that lift the assert to the beginning of the graph. #TODO, global optimizer that lift the assert to the beginning of the graph.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论