Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
ed3e4a82
"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "040a5b9750e168f449f044504efed5515d42d6fe"
Unverified
Commit
ed3e4a82
authored
Nov 11, 2021
by
Vasilis Vryniotis
Committed by
GitHub
Nov 11, 2021
Browse files
Set seed on test_nms_ref to reduce flakiness (#4911)
parent
553553da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
test/test_ops.py
test/test_ops.py
+3
-1
No files found.
test/test_ops.py
View file @
ed3e4a82
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment