提交 5c0e8971 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix in old test.

上级 ab7ce34c
...@@ -5195,10 +5195,9 @@ class T_reshape(utt.InferShapeTester, utt.TestOptimizationMixin): ...@@ -5195,10 +5195,9 @@ class T_reshape(utt.InferShapeTester, utt.TestOptimizationMixin):
# test broadcast flag for constant value of 1 # test broadcast flag for constant value of 1
c = reshape(b, (b.shape[0], b.shape[1], 1)) c = reshape(b, (b.shape[0], b.shape[1], 1))
f = self.function([b], c) f = self.function([b], c)
g = theano.gof.FunctionGraph([b], [c])
assert numpy.all(f(numpy.asarray([[0, 1, 2], [3, 4, 5]])) == assert numpy.all(f(numpy.asarray([[0, 1, 2], [3, 4, 5]])) ==
numpy.asarray([[[0], [1], [2]], [[3], [4], [5]]])) numpy.asarray([[[0], [1], [2]], [[3], [4], [5]]]))
assert (g.toposort()[-1].outputs[0].type.broadcastable == assert (f.maker.fgraph.toposort()[-1].outputs[0].type.broadcastable ==
(False, False, True)) (False, False, True))
def test_m1(self): def test_m1(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论