diff --git a/ppdet/modeling/tests/test_yolov3_loss.py b/ppdet/modeling/tests/test_yolov3_loss.py index 433b3cf2cb95c2a1dd27da30ef9b99f3148e004f..e3c1c403b3690053440a8e88405f4313be08a765 100644 --- a/ppdet/modeling/tests/test_yolov3_loss.py +++ b/ppdet/modeling/tests/test_yolov3_loss.py @@ -356,10 +356,7 @@ class TestYolov3LossOp(unittest.TestCase): x, t, gtbox, anchor, self.downsample_ratio, self.scale_x_y) for k in yolo_loss2: self.assertAlmostEqual( - yolo_loss1[k].numpy()[0], - yolo_loss2[k].numpy()[0], - delta=1e-2, - msg=k) + float(yolo_loss1[k]), float(yolo_loss2[k]), delta=1e-2, msg=k) class TestYolov3LossNoGTScore(TestYolov3LossOp):