提交 2ec75f3e authored 作者: Valentin Bisson's avatar Valentin Bisson

CCW#37: Assert optimization is done only when running with config.mode set to 'FAST_RUN'

上级 83356200
...@@ -453,7 +453,8 @@ def test_remove0(): ...@@ -453,7 +453,8 @@ def test_remove0():
# list of apply nodes in the optimized graph. # list of apply nodes in the optimized graph.
nodes = f.maker.env.toposort() nodes = f.maker.env.toposort()
v = [True for node in nodes if isinstance(node.op, sp.Remove0) and node.op.inplace] v = [True for node in nodes if isinstance(node.op, sp.Remove0) and node.op.inplace]
assert len(v), 'Inplacing optimization should have been applied.' if theano.config.mode == 'FAST_RUN':
assert len(v), 'Inplacing optimization should have been applied.'
# checking # checking
# makes sense to change its name # makes sense to change its name
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论