Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_random_rotate_minmax_value(self):
transform = taug.RandomRotation(degrees=(-45, 0))
inp = torch.rand(1, 3, 4)
assert transform(inp).shape == (1, 3, 4)
def test_random_rotate_minmax_value_batch(self):
transform = taug.RandomRotation(degrees=(-45, 0))
inp = torch.rand(2, 3, 3, 4)
assert transform(inp).shape == (2, 3, 3, 4)
def test_random_rotate_value(self):
transform = taug.RandomRotation(degrees=90)
inp = torch.rand(1, 3, 4)
assert transform(inp).shape == (1, 3, 4)