I was working with the EMNIST dataset and I found that all the images were not oriented properly. I want to rotate all the images in the dataset by 90 degrees. Pls Help me out.
You could use torchvision.transforms.functional.rotate 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.