Unverified Commit ed3e4a82 authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Set seed on test_nms_ref to reduce flakiness (#4911)

parent 553553da
...@@ -479,7 +479,9 @@ class TestNMS: ...@@ -479,7 +479,9 @@ class TestNMS:
return boxes, scores return boxes, scores
@pytest.mark.parametrize("iou", (0.2, 0.5, 0.8)) @pytest.mark.parametrize("iou", (0.2, 0.5, 0.8))
def test_nms_ref(self, iou): @pytest.mark.parametrize("seed", range(10))
def test_nms_ref(self, iou, seed):
torch.random.manual_seed(seed)
err_msg = "NMS incompatible between CPU and reference implementation for IoU={}" err_msg = "NMS incompatible between CPU and reference implementation for IoU={}"
boxes, scores = self._create_tensors_with_iou(1000, iou) boxes, scores = self._create_tensors_with_iou(1000, iou)
keep_ref = self._reference_nms(boxes, scores, iou) keep_ref = self._reference_nms(boxes, scores, iou)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment