You could use torchvision.transforms.functional.rotate 45 to rotate all of your images using a specific angle.
If you’ve created your own Dataset you could just apply it in __getitem__.
Alternatively, you could create a new rotate tranformation and pass it to a transforms.Compose or just pass it as a lambda method to it.