提交 739cff2d 编写于 作者: H HydrogenSulfate 提交者: chajchaj

change to IndexError

上级 3997f99a
......@@ -13,6 +13,7 @@
# limitations under the License.
from __future__ import print_function
from ast import Index
import paddle
import paddle.fluid as fluid
......@@ -1477,7 +1478,7 @@ class TestCrossEntropyFAPIError(unittest.TestCase):
weight=weight_data,
ignore_index=-100)
self.assertRaises(ValueError, test_LabelValue_ExceedMax)
self.assertRaises(IndexError, test_LabelValue_ExceedMax)
def test_LabelValue_ExceedMin():
input_data = paddle.rand(shape=[20, 100])
......@@ -1491,7 +1492,7 @@ class TestCrossEntropyFAPIError(unittest.TestCase):
weight=weight_data,
ignore_index=-100)
self.assertRaises(ValueError, test_LabelValue_ExceedMin)
self.assertRaises(IndexError, test_LabelValue_ExceedMin)
def static_test_WeightLength_NotEqual():
input_np = np.random.random([2, 4]).astype('float32')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册