提交 f9ce967a authored 作者: Sina Honari's avatar Sina Honari

updating T_reshape.test_bad_shape

上级 54938b8a
...@@ -5112,14 +5112,14 @@ class T_reshape(utt.InferShapeTester, utt.TestOptimizationMixin): ...@@ -5112,14 +5112,14 @@ class T_reshape(utt.InferShapeTester, utt.TestOptimizationMixin):
r = a.reshape(shapes, ndim=1) r = a.reshape(shapes, ndim=1)
z = zeros_like(r) z = zeros_like(r)
f = self.function([a, shapes], z.shape) f = self.function([a, shapes], r)
self.assertRaises(ValueError, f, a_val, [13]) self.assertRaises(ValueError, f, a_val, [13])
# Test reshape to 2 dim # Test reshape to 2 dim
r = a.reshape(shapes, ndim=2) r = a.reshape(shapes, ndim=2)
z = zeros_like(r) z = zeros_like(r)
f = self.function([a, shapes], z.shape) f = self.function([a, shapes], r)
self.assertRaises(ValueError, f, a_val, [-1, 5]) self.assertRaises(ValueError, f, a_val, [-1, 5])
self.assertRaises(ValueError, f, a_val, [7, -1]) self.assertRaises(ValueError, f, a_val, [7, -1])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论