Skip to content

Commit 8a62d54

Browse files
authored
Set seed of test_randomperspective_fill (#4759)
* setting 100 seeds, let's see if it fails * Passed with 100, so setting 10
1 parent 313d522 commit 8a62d54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_transforms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,8 +1852,10 @@ def test_randomperspective():
18521852
)
18531853

18541854

1855+
@pytest.mark.parametrize("seed", range(10))
18551856
@pytest.mark.parametrize("mode", ["L", "RGB", "F"])
1856-
def test_randomperspective_fill(mode):
1857+
def test_randomperspective_fill(mode, seed):
1858+
torch.random.manual_seed(seed)
18571859

18581860
# assert fill being either a Sequence or a Number
18591861
with pytest.raises(TypeError):

0 commit comments

Comments
 (0)