Skip to content

Commit 0e27ad8

Browse files
committed
Set rtol=0
1 parent 468fc73 commit 0e27ad8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/test_transforms_v2_consistency.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def __init__(
9898
ArgsKwargs((29, 32), antialias=False),
9999
ArgsKwargs((28, 31), antialias=True),
100100
],
101-
# rtol=atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
102-
closeness_kwargs=dict(rtol=1, atol=1),
101+
# atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
102+
closeness_kwargs=dict(rtol=0, atol=1),
103103
),
104104
ConsistencyConfig(
105105
v2_transforms.CenterCrop,
@@ -315,8 +315,8 @@ def __init__(
315315
ArgsKwargs((29, 32), antialias=False),
316316
ArgsKwargs((28, 31), antialias=True),
317317
],
318-
# rtol=atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
319-
closeness_kwargs=dict(rtol=1, atol=1),
318+
# atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
319+
closeness_kwargs=dict(rtol=0, atol=1),
320320
),
321321
ConsistencyConfig(
322322
v2_transforms.RandomErasing,
@@ -787,8 +787,8 @@ def test_compose(self):
787787
]
788788
)
789789

790-
# rtol=atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
791-
check_call_consistency(prototype_transform, legacy_transform, closeness_kwargs=dict(rtol=1, atol=1))
790+
# atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
791+
check_call_consistency(prototype_transform, legacy_transform, closeness_kwargs=dict(rtol=0, atol=1))
792792

793793
@pytest.mark.parametrize("p", [0, 0.1, 0.5, 0.9, 1])
794794
@pytest.mark.parametrize("sequence_type", [list, nn.ModuleList])
@@ -812,8 +812,8 @@ def test_random_apply(self, p, sequence_type):
812812
p=p,
813813
)
814814

815-
# rtol=atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
816-
check_call_consistency(prototype_transform, legacy_transform, closeness_kwargs=dict(rtol=1, atol=1))
815+
# atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
816+
check_call_consistency(prototype_transform, legacy_transform, closeness_kwargs=dict(rtol=0, atol=1))
817817

818818
if sequence_type is nn.ModuleList:
819819
# quick and dirty test that it is jit-scriptable
@@ -838,8 +838,8 @@ def test_random_choice(self, probabilities):
838838
p=probabilities,
839839
)
840840

841-
# rtol=atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
842-
check_call_consistency(prototype_transform, legacy_transform, closeness_kwargs=dict(rtol=1, atol=1))
841+
# atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
842+
check_call_consistency(prototype_transform, legacy_transform, closeness_kwargs=dict(rtol=0, atol=1))
843843

844844

845845
class TestToTensorTransforms:

0 commit comments

Comments
 (0)