How to use the torchgeometry.augmentation.RandomRotation function in torchgeometry

To help you get started, we’ve selected a few torchgeometry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kornia / kornia / test / test_augmentation.py View on Github external
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)
github kornia / kornia / test / test_augmentation.py View on Github external
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)
github kornia / kornia / test / test_augmentation.py View on Github external
def test_random_rotate_value(self):
        transform = taug.RandomRotation(degrees=90)
        inp = torch.rand(1, 3, 4)
        assert transform(inp).shape == (1, 3, 4)