Could you post a code snippet to reproduce this issue?
This code runs fine:
import torchvision.transforms.functional as TF

x = torch.randn(3, 224, 224)
img = TF.to_pil_image(x)
img = TF.rotate(img, 10)