提交 56bd5b80 authored 作者: Frederic Bastien's avatar Frederic Bastien

Skip some test when cudnn isn't available and make tests pass when device=gpu.

上级 5639c0f0
......@@ -21,6 +21,7 @@ if theano.config.mode == 'FAST_COMPILE':
else:
mode_with_gpu = theano.compile.mode.get_default_mode().including('gpu')
mode_without_gpu = theano.compile.mode.get_default_mode()
mode_without_gpu = mode_without_gpu.excluding('gpu')
def test_GpuCrossentropySoftmaxArgmax1HotWithBias():
......
......@@ -743,6 +743,8 @@ def test_dnn_conv_alpha_output_merge():
def test_dnn_conv_grad():
if not dnn.dnn_available(test_ctx_name):
raise SkipTest(dnn.dnn_available.msg)
b = 1
c = 4
f = 3
......@@ -788,6 +790,10 @@ class test_SoftMax(test_nnet.test_SoftMax):
gpu_grad_op = dnn.GpuDnnSoftmaxGrad
mode = mode_with_gpu
def setUp(self):
if not dnn.dnn_available(test_ctx_name):
raise SkipTest(dnn.dnn_available.msg)
def test_softmax_shape_0(self):
raise SkipTest("Cudnn doesn't support 0 shapes")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论