Unverified Commit 50dfe207 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Fix seed for TestColorJitter (#4762)

* setting 100 seeds

* back to 10 seeds
parent e00d8189
......@@ -115,9 +115,14 @@ def test_random(func, method, device, channels, fn_kwargs, match_kwargs):
_test_op(func, method, device, channels, fn_kwargs, fn_kwargs, **match_kwargs)
@pytest.mark.parametrize("seed", range(10))
@pytest.mark.parametrize("device", cpu_and_gpu())
@pytest.mark.parametrize("channels", [1, 3])
class TestColorJitter:
@pytest.fixture(autouse=True)
def set_random_seed(self, seed):
torch.random.manual_seed(seed)
@pytest.mark.parametrize("brightness", [0.1, 0.5, 1.0, 1.34, (0.3, 0.7), [0.4, 0.5]])
def test_color_jitter_brightness(self, brightness, device, channels):
tol = 1.0 + 1e-10
......
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