Module 'transforms' has no attribute 'RandomRotation'

I got this error using this version

Torch version 1.10.1
Cuda 11.3

Which torchvision version did you install as the transformation is shipped in this package?
You can check it with torchvision.__version__.

HI @ptrblck , torchvision: 0.11.2

torchvision==0.11.2 contains this transformation:

>>> import torchvision
>>> torchvision.__version__
>>> torchvision.transforms.RandomRotation
<class 'torchvision.transforms.transforms.RandomRotation'>
1 Like

This function is only useful to do image rotate. In pytorch exists rotation to bounding box as well?