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
e00d8189
Unverified
Commit
e00d8189
authored
Oct 27, 2021
by
Nicolas Hug
Committed by
GitHub
Oct 27, 2021
Browse files
Set seed of test_random_erasing (#4764)
* Trying with 100 seeds * Change seeds from 100 to 10
parent
3a17e339
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
test/test_transforms.py
test/test_transforms.py
+3
-1
No files found.
test/test_transforms.py
View file @
e00d8189
...
@@ -1750,8 +1750,10 @@ def test_color_jitter():
...
@@ -1750,8 +1750,10 @@ def test_color_jitter():
color_jitter
.
__repr__
()
color_jitter
.
__repr__
()
@
pytest
.
mark
.
parametrize
(
"seed"
,
range
(
10
))
@
pytest
.
mark
.
skipif
(
stats
is
None
,
reason
=
"scipy.stats not available"
)
@
pytest
.
mark
.
skipif
(
stats
is
None
,
reason
=
"scipy.stats not available"
)
def
test_random_erasing
():
def
test_random_erasing
(
seed
):
torch
.
random
.
manual_seed
(
seed
)
img
=
torch
.
ones
(
3
,
128
,
128
)
img
=
torch
.
ones
(
3
,
128
,
128
)
t
=
transforms
.
RandomErasing
(
scale
=
(
0.1
,
0.1
),
ratio
=
(
1
/
3
,
3.0
))
t
=
transforms
.
RandomErasing
(
scale
=
(
0.1
,
0.1
),
ratio
=
(
1
/
3
,
3.0
))
...
...
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