Skip to content

Commit

Permalink
Fix test code to not depend on ordering of inputs to addition.
Browse files Browse the repository at this point in the history
  • Loading branch information
abergeron committed Jul 24, 2015
1 parent e7f91a1 commit 208acb3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions theano/sandbox/cuda/tests/test_dnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,12 @@ def test_dnn_conv_merge_broad():
fr = conv + lr

f = theano.function([img, kern], [fr])
assert not isinstance(f.maker.fgraph.outputs[0].owner.inputs[0].owner.op,
dnn.GpuDnnConv)
convs = [n for n in f.maker.fgraph.toposort()
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():
Expand Down

0 comments on commit 208acb3

Please sign in to comment.