提交 1cea85c6 authored 作者: Frederic's avatar Frederic

Make tests pass more often in float32 and skip cudnn tests

上级 e526d59c
...@@ -413,6 +413,8 @@ def test_dnn_valid(): ...@@ -413,6 +413,8 @@ def test_dnn_valid():
def test_dnn_valid_err(): def test_dnn_valid_err():
if not cuda.dnn.dnn_available():
raise SkipTest(cuda.dnn.dnn_available.msg)
assert_raises(ValueError, _params_allgood, (1, 2, 4, 4), (1, 1, 2, 2), assert_raises(ValueError, _params_allgood, (1, 2, 4, 4), (1, 1, 2, 2),
'valid', theano_mode=theano_mode.including("cudnn"), 'valid', theano_mode=theano_mode.including("cudnn"),
cls=DnnBase) cls=DnnBase)
......
...@@ -1130,7 +1130,8 @@ _grad_broadcast_unary_abs1_no_complex = dict( ...@@ -1130,7 +1130,8 @@ _grad_broadcast_unary_abs1_no_complex = dict(
) )
_grad_broadcast_unary_0_2_no_complex = dict( _grad_broadcast_unary_0_2_no_complex = dict(
normal=[numpy.asarray(rand_ranged(0, 2, (2, 3)), dtype=floatX)], # Don't go too close to 2 for tests in float32
normal=[numpy.asarray(rand_ranged(0, 1.9, (2, 3)), dtype=floatX)],
) )
# inplace ops when the input is integer and the output is float* # inplace ops when the input is integer and the output is float*
...@@ -1760,7 +1761,7 @@ _good_broadcast_unary_gammaln = dict( ...@@ -1760,7 +1761,7 @@ _good_broadcast_unary_gammaln = dict(
empty=(numpy.asarray([], dtype=config.floatX),),) empty=(numpy.asarray([], dtype=config.floatX),),)
_grad_broadcast_unary_gammaln = dict( _grad_broadcast_unary_gammaln = dict(
# smaller range as our grad method does not estimate it well enough. # smaller range as our grad method does not estimate it well enough.
normal=(rand_ranged(1e-8, 8, (2, 3)),),) normal=(rand_ranged(1e-1, 8, (2, 3)),),)
GammaTester = makeBroadcastTester( GammaTester = makeBroadcastTester(
op=tensor.gamma, op=tensor.gamma,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论