提交 c37a6bb3 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix test so that it actually crashes on unfixed code.

上级 ca630a9b
...@@ -358,10 +358,14 @@ def test_local_gpu_elemwise(): ...@@ -358,10 +358,14 @@ def test_local_gpu_elemwise():
utt.assert_allclose(out[1], a_v[::2] * c_v[::2]) utt.assert_allclose(out[1], a_v[::2] * c_v[::2])
def test_local_lift_abstractconv_gpu_shape(self): def test_local_lift_abstractconv_gpu_shape():
prev = theano.config.on_opt_error
try:
theano.config.on_opt_error = 'raise'
s = tensor.ivector() s = tensor.ivector()
a = tensor.alloc(0, s[0], s[1], s[2], s[3]) a = tensor.ftensor4()
b = tensor.alloc(0, s[0], s[1], s[2], s[3]) b = tensor.ftensor4()
c = tensor.conv.conv2d(a, b) c = tensor.nnet.abstract_conv.AbstractConv2d_gradWeights()(a, b, s)
g = theano.grad(c) f = theano.function([s, a, b], c, mode=mode_with_gpu)
f = theano.function([s], g, mode=mode_with_gpu) finally:
theano.config.on_opt_error = prev
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论