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

Don't use test_values when checking for errors.

上级 7286408b
...@@ -421,6 +421,7 @@ class T_subtensor(unittest.TestCase, utt.TestOptimizationMixin): ...@@ -421,6 +421,7 @@ class T_subtensor(unittest.TestCase, utt.TestOptimizationMixin):
assert_array_equal(numpy_inc_subtensor(numpy_n4, [numpy_n > 2, Ellipsis, 0, 1], 1), assert_array_equal(numpy_inc_subtensor(numpy_n4, [numpy_n > 2, Ellipsis, 0, 1], 1),
inc_subtensor(n4[n > 2, ..., 0, 1], 1).eval()) inc_subtensor(n4[n > 2, ..., 0, 1], 1).eval())
with change_flags(compute_test_value='off'):
# the boolean mask should have the correct shape # the boolean mask should have the correct shape
# - too large, padded with True # - too large, padded with True
mask = np.array([True, False, True]) mask = np.array([True, False, True])
......
...@@ -9,7 +9,7 @@ import numpy as np ...@@ -9,7 +9,7 @@ import numpy as np
from six.moves import xrange from six.moves import xrange
import theano import theano
from theano import gof from theano import gof, change_flags
from theano.compat import izip from theano.compat import izip
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
...@@ -803,6 +803,7 @@ def test_grad_scale(): ...@@ -803,6 +803,7 @@ def test_grad_scale():
assert np.allclose(out, (8, 4)) assert np.allclose(out, (8, 4))
@change_flags(compute_test_value='off')
def test_undefined_grad_opt(): def test_undefined_grad_opt():
# Make sure that undefined grad get removed in optimized graph. # Make sure that undefined grad get removed in optimized graph.
random = RandomStreams(np.random.randint(1, 2147462579)) random = RandomStreams(np.random.randint(1, 2147462579))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论