提交 04cd0aef 编写于 作者: H HydrogenSulfate 提交者: chajchaj

change error to IndexError

上级 d49daff0
...@@ -1463,7 +1463,7 @@ class TestCrossEntropyFAPIError(unittest.TestCase): ...@@ -1463,7 +1463,7 @@ class TestCrossEntropyFAPIError(unittest.TestCase):
weight=weight_data, weight=weight_data,
ignore_index=-100) ignore_index=-100)
self.assertRaises(ValueError, test_WeightLength_NotEqual) self.assertRaises(IndexError, test_WeightLength_NotEqual)
def test_LabelValue_ExceedMax(): def test_LabelValue_ExceedMax():
input_data = paddle.rand(shape=[20, 100]) input_data = paddle.rand(shape=[20, 100])
...@@ -1477,7 +1477,7 @@ class TestCrossEntropyFAPIError(unittest.TestCase): ...@@ -1477,7 +1477,7 @@ class TestCrossEntropyFAPIError(unittest.TestCase):
weight=weight_data, weight=weight_data,
ignore_index=-100) ignore_index=-100)
self.assertRaises(ValueError, test_LabelValue_ExceedMax) self.assertRaises(IndexError, test_LabelValue_ExceedMax)
def test_LabelValue_ExceedMin(): def test_LabelValue_ExceedMin():
input_data = paddle.rand(shape=[20, 100]) input_data = paddle.rand(shape=[20, 100])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册