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
99a999c0
Unverified
Commit
99a999c0
authored
Dec 11, 2023
by
Nicolas Hug
Committed by
GitHub
Dec 11, 2023
Browse files
Fix TestElastic::test_transform on M1 (#8155)
parent
e12d200c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
test/test_transforms_v2.py
test/test_transforms_v2.py
+7
-2
No files found.
test/test_transforms_v2.py
View file @
99a999c0
...
...
@@ -7,6 +7,7 @@ import math
import
pickle
import
random
import
re
import
sys
from
copy
import
deepcopy
from
pathlib
import
Path
from
unittest
import
mock
...
...
@@ -2669,11 +2670,15 @@ class TestElastic:
@
pytest
.
mark
.
parametrize
(
"size"
,
[(
163
,
163
),
(
72
,
333
),
(
313
,
95
)])
@
pytest
.
mark
.
parametrize
(
"device"
,
cpu_and_cuda
())
def
test_transform
(
self
,
make_input
,
size
,
device
):
# We have to skip that test on M1 because it's flaky: Mismatched elements: 35 / 89205 (0.0%)
# See https://github.com/pytorch/vision/issues/8154
# All other platforms are fine, so the differences do not come from something we own in torchvision
check_v1_compatibility
=
False
if
sys
.
platform
==
"darwin"
else
dict
(
rtol
=
0
,
atol
=
1
)
check_transform
(
transforms
.
ElasticTransform
(),
make_input
(
size
,
device
=
device
),
# We updated gaussian blur kernel generation with a faster and numerically more stable version
check_v1_compatibility
=
dict
(
rtol
=
0
,
atol
=
1
),
check_v1_compatibility
=
check_v1_compatibility
,
)
...
...
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