Unverified Commit a335d916 authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

fix formatting in test_functional_tensor.py (#7709)

parent 1c1cd68b
...@@ -293,24 +293,8 @@ class TestAffine: ...@@ -293,24 +293,8 @@ class TestAffine:
(33, (5, -4), 1.0, [0.0, 0.0], [0, 0, 0]), (33, (5, -4), 1.0, [0.0, 0.0], [0, 0, 0]),
(45, [-5, 4], 1.2, [0.0, 0.0], (1, 2, 3)), (45, [-5, 4], 1.2, [0.0, 0.0], (1, 2, 3)),
(33, (-4, -8), 2.0, [0.0, 0.0], [255, 255, 255]), (33, (-4, -8), 2.0, [0.0, 0.0], [255, 255, 255]),
( (85, (10, -10), 0.7, [0.0, 0.0], [1]),
85, (0, [0, 0], 1.0, [35.0], (2.0,)),
(10, -10),
0.7,
[0.0, 0.0],
[
1,
],
),
(
0,
[0, 0],
1.0,
[
35.0,
],
(2.0,),
),
(-25, [0, 0], 1.2, [0.0, 15.0], None), (-25, [0, 0], 1.2, [0.0, 15.0], None),
(-45, [-10, 0], 0.7, [2.0, 5.0], None), (-45, [-10, 0], 0.7, [2.0, 5.0], None),
(-45, [-10, -10], 1.2, [4.0, 5.0], None), (-45, [-10, -10], 1.2, [4.0, 5.0], None),
...@@ -392,19 +376,7 @@ def _get_data_dims_and_points_for_perspective(): ...@@ -392,19 +376,7 @@ def _get_data_dims_and_points_for_perspective():
@pytest.mark.parametrize("device", cpu_and_cuda()) @pytest.mark.parametrize("device", cpu_and_cuda())
@pytest.mark.parametrize("dims_and_points", _get_data_dims_and_points_for_perspective()) @pytest.mark.parametrize("dims_and_points", _get_data_dims_and_points_for_perspective())
@pytest.mark.parametrize("dt", [None, torch.float32, torch.float64, torch.float16]) @pytest.mark.parametrize("dt", [None, torch.float32, torch.float64, torch.float16])
@pytest.mark.parametrize( @pytest.mark.parametrize("fill", (None, [0, 0, 0], [1, 2, 3], [255, 255, 255], [1], (2.0,)))
"fill",
(
None,
[0, 0, 0],
[1, 2, 3],
[255, 255, 255],
[
1,
],
(2.0,),
),
)
@pytest.mark.parametrize("fn", [F.perspective, torch.jit.script(F.perspective)]) @pytest.mark.parametrize("fn", [F.perspective, torch.jit.script(F.perspective)])
def test_perspective_pil_vs_tensor(device, dims_and_points, dt, fill, fn): def test_perspective_pil_vs_tensor(device, dims_and_points, dt, fill, fn):
...@@ -475,19 +447,7 @@ def test_perspective_interpolation_type(): ...@@ -475,19 +447,7 @@ def test_perspective_interpolation_type():
@pytest.mark.parametrize("device", cpu_and_cuda()) @pytest.mark.parametrize("device", cpu_and_cuda())
@pytest.mark.parametrize("dt", [None, torch.float32, torch.float64, torch.float16]) @pytest.mark.parametrize("dt", [None, torch.float32, torch.float64, torch.float16])
@pytest.mark.parametrize( @pytest.mark.parametrize("size", [32, 26, [32], [32, 32], (32, 32), [26, 35]])
"size",
[
32,
26,
[
32,
],
[32, 32],
(32, 32),
[26, 35],
],
)
@pytest.mark.parametrize("max_size", [None, 34, 40, 1000]) @pytest.mark.parametrize("max_size", [None, 34, 40, 1000])
@pytest.mark.parametrize("interpolation", [BILINEAR, BICUBIC, NEAREST, NEAREST_EXACT]) @pytest.mark.parametrize("interpolation", [BILINEAR, BICUBIC, NEAREST, NEAREST_EXACT])
def test_resize(device, dt, size, max_size, interpolation): def test_resize(device, dt, size, max_size, interpolation):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment