未验证 提交 86fa1715 编写于 作者: zhouweiwei2014's avatar zhouweiwei2014 提交者: GitHub

disable scatter zero_dim test (#49853)

上级 4c576870
...@@ -477,7 +477,7 @@ class TestSundryAPI(unittest.TestCase): ...@@ -477,7 +477,7 @@ class TestSundryAPI(unittest.TestCase):
self.assertEqual(x.grad.shape, [2, 3]) self.assertEqual(x.grad.shape, [2, 3])
self.assertEqual(out.grad.shape, [2]) self.assertEqual(out.grad.shape, [2])
def test_scatter_1D(self): def _test_scatter_1D(self):
x = paddle.to_tensor([1.0, 3.0, 5.0, 7.0, 9.0], stop_gradient=False) x = paddle.to_tensor([1.0, 3.0, 5.0, 7.0, 9.0], stop_gradient=False)
index = paddle.full([], 2, 'int64') index = paddle.full([], 2, 'int64')
updates = paddle.full([], 4.0) updates = paddle.full([], 4.0)
...@@ -488,7 +488,7 @@ class TestSundryAPI(unittest.TestCase): ...@@ -488,7 +488,7 @@ class TestSundryAPI(unittest.TestCase):
self.assertEqual(out.numpy()[2], 4) self.assertEqual(out.numpy()[2], 4)
self.assertEqual(out.grad.shape, [5]) self.assertEqual(out.grad.shape, [5])
def test_scatter_XD(self): def _test_scatter_XD(self):
x = paddle.to_tensor( x = paddle.to_tensor(
[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], stop_gradient=False [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], stop_gradient=False
) )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册