提交 f902e1b3 authored 作者: abergeron's avatar abergeron

Merge pull request #4205 from abergeron/fix_buildbot2

Fix test that fails on the buildbot
...@@ -823,7 +823,8 @@ def test_blocksparse_gpu_gemv_opt(): ...@@ -823,7 +823,8 @@ def test_blocksparse_gpu_gemv_opt():
f = theano.function([W, h, iIdx, b, oIdx], o, mode=mode_with_gpu) f = theano.function([W, h, iIdx, b, oIdx], o, mode=mode_with_gpu)
assert isinstance(f.maker.fgraph.toposort()[-2].op, GpuSparseBlockGemv) assert sum(1 for n in f.maker.fgraph.apply_nodes
if isinstance(n.op, GpuSparseBlockGemv)) == 1
def test_blocksparse_gpu_outer_opt(): def test_blocksparse_gpu_outer_opt():
...@@ -839,7 +840,8 @@ def test_blocksparse_gpu_outer_opt(): ...@@ -839,7 +840,8 @@ def test_blocksparse_gpu_outer_opt():
wrt=W)], wrt=W)],
mode=mode_with_gpu) mode=mode_with_gpu)
assert isinstance(f.maker.fgraph.toposort()[-2].op, GpuSparseBlockOuter) assert sum(1 for n in f.maker.fgraph.apply_nodes
if isinstance(n.op, GpuSparseBlockOuter)) == 1
class test_diag(theano.tensor.tests.test_nlinalg.test_diag): class test_diag(theano.tensor.tests.test_nlinalg.test_diag):
......
...@@ -1355,7 +1355,7 @@ class MaxAndArgmax(Op): ...@@ -1355,7 +1355,7 @@ class MaxAndArgmax(Op):
if axes is None: if axes is None:
axes = tuple(range(x.ndim)) axes = tuple(range(x.ndim))
else: else:
axes = tuple(axes) axes = tuple(int(ax) for ax in axes)
max[0] = theano._asarray(numpy.max(x, axes), max[0] = theano._asarray(numpy.max(x, axes),
dtype=node.outputs[0].dtype) dtype=node.outputs[0].dtype)
# Numpy does not support multiple axes for argmax # Numpy does not support multiple axes for argmax
......
...@@ -64,6 +64,8 @@ class TestGetConvOutShape(unittest.TestCase): ...@@ -64,6 +64,8 @@ class TestGetConvOutShape(unittest.TestCase):
class BaseTestConv2d(unittest.TestCase): class BaseTestConv2d(unittest.TestCase):
def setUp(self): def setUp(self):
if theano.config.blas.ldflags == '':
raise SkipTest("BLAS required for reference")
self.inputs_shapes = [(8, 1, 12, 12), (8, 1, 18, 18), (2, 1, 4, 4), self.inputs_shapes = [(8, 1, 12, 12), (8, 1, 18, 18), (2, 1, 4, 4),
(6, 1, 10, 11), (2, 1, 6, 5), (1, 5, 9, 9)] (6, 1, 10, 11), (2, 1, 6, 5), (1, 5, 9, 9)]
self.filters_shapes = [(5, 1, 2, 2), (4, 1, 3, 3), (2, 1, 3, 3), self.filters_shapes = [(5, 1, 2, 2), (4, 1, 3, 3), (2, 1, 3, 3),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论