From c4c9f907d2538e699159a96a03dd98947f3bf3ba Mon Sep 17 00:00:00 2001 From: buxue Date: Sat, 9 Jul 2022 16:56:34 +0800 Subject: [PATCH] fix CropResize op on CPU --- tests/st/ops/cpu/test_crop_and_resize_op.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/st/ops/cpu/test_crop_and_resize_op.py b/tests/st/ops/cpu/test_crop_and_resize_op.py index b686b4f11d5..3a7ee2bfefc 100644 --- a/tests/st/ops/cpu/test_crop_and_resize_op.py +++ b/tests/st/ops/cpu/test_crop_and_resize_op.py @@ -221,9 +221,7 @@ def test_crop_and_resize_float32_bilinear(datatype=np.float32): [0.0, 0.0, 0.0]], [[299412.5, 299413.5, 299414.5], [300043.625, 300044.625, 300045.625], [0.0, 0.0, 0.0]]]]).astype(np.float32) - error = np.ones(shape=[2, *crop_size, channels]) * 0.01 - diff = output_ms - expected_output - assert np.all(abs(diff) < error) + assert np.allclose(output_ms, expected_output) @pytest.mark.level0