Thank you for suggestion,
The problem is this is the tensor as an intermediate layer in a network. Using PIL lib would requires to convert it back to numpy which is significantly slow.
Secondly, as I haven’t yet figure out how to use use random rotation class caused it only allow to use in the augmentation process.
Thirdly, making a custom class as modified of random rotation sounds reasonable. But I haven’t try yet. Just wonder why pyTorch does not support this function.
Thank you for your suggestions