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

fix test in python3

上级 4f43e93c
...@@ -64,7 +64,7 @@ class test_ifelse(unittest.TestCase, utt.TestOptimizationMixin): ...@@ -64,7 +64,7 @@ class test_ifelse(unittest.TestCase, utt.TestOptimizationMixin):
# the opt. # the opt.
'fusion', 'local_add_canonizer', 'fusion', 'local_add_canonizer',
'inplace', 'constant_folding', 'constant_folding') 'inplace', 'constant_folding', 'constant_folding')
y2 = reduce(lambda x, y: x + y, [y] + range(200)) y2 = reduce(lambda x, y: x + y, [y] + list(range(200)))
f = theano.function([c, x, y], ifelse(c, x, y2), mode=mode) f = theano.function([c, x, y], ifelse(c, x, y2), mode=mode)
# For not inplace ifelse # For not inplace ifelse
self.assertFunctionContains1(f, IfElse(1)) self.assertFunctionContains1(f, IfElse(1))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论