提交 3d92d7b1 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make sure compute_test_value has valid data.

上级 b3523b83
...@@ -4431,12 +4431,12 @@ class T_Join_and_Split(unittest.TestCase): ...@@ -4431,12 +4431,12 @@ class T_Join_and_Split(unittest.TestCase):
assert not isinstance(node.op, type(self.join_op)) assert not isinstance(node.op, type(self.join_op))
# Test dim 1 # Test dim 1
z = self.join_op(1, x1, x2, x3)
f = theano.function([], z.shape, mode=self.mode)
topo = f.maker.fgraph.toposort()
x1.set_value(get_mat(3, 4)) x1.set_value(get_mat(3, 4))
x2.set_value(get_mat(3, 4)) x2.set_value(get_mat(3, 4))
x3.set_value(get_mat(3, 5)) x3.set_value(get_mat(3, 5))
z = self.join_op(1, x1, x2, x3)
f = theano.function([], z.shape, mode=self.mode)
topo = f.maker.fgraph.toposort()
out = f() out = f()
assert (out == [3, 13]).all() assert (out == [3, 13]).all()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论