提交 208acb3a authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix test code to not depend on ordering of inputs to addition.

上级 e7f91a14
...@@ -700,8 +700,12 @@ def test_dnn_conv_merge_broad(): ...@@ -700,8 +700,12 @@ def test_dnn_conv_merge_broad():
fr = conv + lr fr = conv + lr
f = theano.function([img, kern], [fr]) f = theano.function([img, kern], [fr])
assert not isinstance(f.maker.fgraph.outputs[0].owner.inputs[0].owner.op, convs = [n for n in f.maker.fgraph.toposort()
dnn.GpuDnnConv) if isinstance(n.op, dnn.GpuDnnConv)]
assert len(convs) == 1
conv = convs[0]
# Assert output was not merged
assert isinstance(conv.inputs[2].owner.op, GpuAllocEmpty)
def test_dnn_conv_grad(): def test_dnn_conv_grad():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论