If you have the latest torchvision build, you should be able to use torchvision.transforms.RandomRotation, there is no transforms.Rotate
I think you can use it like transforms.RandomRotation((degree,degree), ...) if you want to have a fixed rotation.