提交 4af3d967 authored 作者: Frederic's avatar Frederic

remove warning in test.

上级 0bd8eee5
......@@ -3488,7 +3488,7 @@ def local_reduce_join(node):
return
if isinstance(node.op.scalar_op, (scalar.Maximum, scalar.Minimum)):
#Support only 2 inputs for now
# Support only 2 inputs for now
if len(join.inputs) != 3:
return
elif not isinstance(node.op.scalar_op, (scalar.Add, scalar.Mul)):
......
......@@ -3882,7 +3882,13 @@ class T_local_reduce(unittest.TestCase):
assert isinstance(topo[-1].op, T.Elemwise)
# Test a case that was bugged in a old Theano bug
f = theano.function([], T.sum(T.stack(A, A), axis=1), mode=self.mode)
try:
old = theano.config.warn.reduce_join
theano.config.warn.reduce_join = False
f = theano.function([], T.sum(T.stack(A, A), axis=1),
mode=self.mode)
finally:
theano.config.warn.reduce_join = old
assert numpy.allclose(f(), [15, 15])
topo = f.maker.fgraph.toposort()
assert not isinstance(topo[-1].op, T.Elemwise)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论