提交 e1ea895f 编写于 作者: R root 提交者: chajchaj

fix ci coverage bug

上级 ef7e5fc7
......@@ -1370,7 +1370,8 @@ class TestCrossEntropyFAPIError(unittest.TestCase):
def test_LabelValue():
input_data = paddle.rand(shape=[20, 100])
label_data = paddle.randint(0, 100, shape=[5, 1], dtype="int64")
label_data = paddle.randint(
0, 100, shape=[20, 1], dtype="int64")
label_data[0] = 255
paddle.nn.functional.cross_entropy(
input=input_data, label=label_data)
......@@ -1379,7 +1380,8 @@ class TestCrossEntropyFAPIError(unittest.TestCase):
def test_LabelValueNeg():
input_data = paddle.rand(shape=[20, 100])
label_data = paddle.randint(0, 100, shape=[5, 1], dtype="int64")
label_data = paddle.randint(
0, 100, shape=[20, 1], dtype="int64")
label_data[0] = -1
paddle.nn.functional.cross_entropy(
input=input_data, label=label_data)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册