提交 2d3fb121 authored 作者: Frederic's avatar Frederic

Fix false error in DebugMode with a test.

We explicitly use and -inf in the graph, so DebugMode shouldn't complain about this.
上级 13c43183
......@@ -2523,7 +2523,11 @@ class test_shapeoptimizer(unittest.TestCase):
rng = numpy.random.RandomState(utt.fetch_seed())
a = shared(rng.rand(*shp).astype(config.floatX))
out = self.max_pool_c01b(a, 1, 1, 1)
f = theano.function([], out)
#max_pool_c01b use -inf and this will trigger DebugMode error.
mode = copy.copy(theano.compile.get_default_mode())
mode.check_isfinite = False
f = theano.function([], out, mode=mode)
f()
def test_local_track_shape_i(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论