提交 bbcc6970 authored 作者: Frederic's avatar Frederic

small test update following code review

上级 5a5bf5f8
...@@ -55,15 +55,15 @@ def test_dnn_conv_desc_merge(): ...@@ -55,15 +55,15 @@ def test_dnn_conv_desc_merge():
f = theano.function([], [theano.Out(desc1, borrow=True), f = theano.function([], [theano.Out(desc1, borrow=True),
theano.Out(desc1v2, borrow=True)], theano.Out(desc1v2, borrow=True)],
mode=mode_with_gpu) mode=mode_with_gpu)
assert len(f.maker.fgraph.apply_nodes) assert len([n for n in f.maker.fgraph.apply_nodes
theano.printing.debugprint(f) if isinstance(n.op, dnn.GpuDnnConvDesc)]) == 1
# CDATA type don't equal even if they represent the same object # CDATA type don't equal even if they represent the same object
# So we can't use debugmode with it. # So we can't use debugmode with it.
if theano.config.mode not in ["DebugMode", "DEBUG_MODE"]: if theano.config.mode not in ["DebugMode", "DEBUG_MODE"]:
d1, d2 = f() d1, d2 = f()
# This will be the case if they are merged, which would be bad. # They won't be equal if they aren't merged.
assert d1 == d2 assert d1 == d2
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论