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
6218dc3a
Unverified
Commit
6218dc3a
authored
Mar 09, 2023
by
SvenDS9
Committed by
GitHub
Mar 09, 2023
Browse files
guard against deprecation of binom_test (#7404)
parent
e59cf64b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
test/test_ops.py
test/test_ops.py
+1
-1
test/test_transforms.py
test/test_transforms.py
+2
-2
No files found.
test/test_ops.py
View file @
6218dc3a
...
...
@@ -1640,7 +1640,7 @@ class TestStochasticDepth:
counts
+=
batch_size
-
non_zero_count
num_samples
+=
batch_size
p_value
=
stats
.
binom
_
test
(
counts
,
num_samples
,
p
=
p
)
p_value
=
stats
.
binomtest
(
counts
,
num_samples
,
p
=
p
)
.
pvalue
assert
p_value
>
0.01
@
pytest
.
mark
.
parametrize
(
"seed"
,
range
(
10
))
...
...
test/test_transforms.py
View file @
6218dc3a
...
...
@@ -1445,7 +1445,7 @@ def test_random_order():
if
out
==
resize_crop_out
:
num_normal_order
+=
1
p_value
=
stats
.
binom
_
test
(
num_normal_order
,
num_samples
,
p
=
0.5
)
p_value
=
stats
.
binomtest
(
num_normal_order
,
num_samples
,
p
=
0.5
)
.
pvalue
random
.
setstate
(
random_state
)
assert
p_value
>
0.0001
...
...
@@ -1851,7 +1851,7 @@ def test_random_erasing(seed):
aspect_ratios
.
append
(
h
/
w
)
count_bigger_then_ones
=
len
([
1
for
aspect_ratio
in
aspect_ratios
if
aspect_ratio
>
1
])
p_value
=
stats
.
binom
_
test
(
count_bigger_then_ones
,
trial
,
p
=
0.5
)
p_value
=
stats
.
binomtest
(
count_bigger_then_ones
,
trial
,
p
=
0.5
)
.
pvalue
assert
p_value
>
0.0001
# Checking if RandomErasing can be printed as string
...
...
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