Unverified Commit c786d124 authored by Joao Gomes's avatar Joao Gomes Committed by GitHub
Browse files

Setting seeds for test_batched_nms_implementations (#4766)

* adding multiweight support for deeplabv3 prototype models

* adding default values for optional params

* fixing bug

* addressing PR comment

* fixing seed in test_batched_nms_implementations

* change seeds in test_batched_nms_implementations

* change seeds in test_batched_nms_implementations
parent 9528d963
...@@ -557,8 +557,10 @@ class TestNMS: ...@@ -557,8 +557,10 @@ class TestNMS:
keep16 = ops.nms(boxes.to(torch.float16), scores.to(torch.float16), iou_thres) keep16 = ops.nms(boxes.to(torch.float16), scores.to(torch.float16), iou_thres)
assert_equal(keep32, keep16) assert_equal(keep32, keep16)
def test_batched_nms_implementations(self): @pytest.mark.parametrize("seed", range(10))
def test_batched_nms_implementations(self, seed):
"""Make sure that both implementations of batched_nms yield identical results""" """Make sure that both implementations of batched_nms yield identical results"""
torch.random.manual_seed(seed)
num_boxes = 1000 num_boxes = 1000
iou_threshold = 0.9 iou_threshold = 0.9
......
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