I typically use scipy’s rotate function:
https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.ndimage.interpolation.rotate.html 152
Unfortunately it’s not very fast and you have to apply it on a numpy tensor, i.e. before you convert it to a pytorch tensor.