提交 00c376dd authored 作者: --global's avatar --global

Change test to use change_flags decorator

上级 154cc795
......@@ -2696,6 +2696,7 @@ class T_Scan(unittest.TestCase):
utt.assert_allclose(expected_output, scan_output)
utt.assert_allclose(expected_output, jacobian_outputs)
@theano.configparser.change_flags(on_opt_error='raise')
def test_pushout_seqs2(self):
# This test for a bug with PushOutSeqScan that was reported on the
# theano-user mailing list where the optimization raised an exception
......@@ -2710,12 +2711,7 @@ class T_Scan(unittest.TestCase):
# Compile a theano function where any optimization error will lead to
# an exception being raised
on_opt_error = theano.config.on_opt_error
theano.config.on_opt_error = 'raise'
try:
theano.function([x], outputs, updates=updates)
finally:
theano.config.on_opt_error = on_opt_error
theano.function([x], outputs, updates=updates)
def test_sequence_dict(self):
# Test that we can specify sequences as a dictionary with
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论