未验证 提交 36e5de81 编写于 作者: 张春乔 提交者: GitHub

fix div 0 error in chunk (#49998)

上级 7e4b432b
......@@ -52,6 +52,14 @@ class TestChunkOpError(unittest.TestCase):
self.assertRaises(TypeError, test_axis_type_tensor)
with paddle.fluid.dygraph.guard():
def test_0_chunks_tensor():
x = paddle.uniform([1, 1, 1], dtype='float32')
paddle.chunk(x, chunks=0)
self.assertRaises(ValueError, test_0_chunks_tensor)
class API_TestChunk(unittest.TestCase):
def test_out(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册