How can I rotate random degree in 4D tensor (B,C,H,W)? Thanks
How can I rotate random degree in 4D tensor (B,C,H,W)
derEitel
#4
I typically use scipy’s rotate function:
https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.ndimage.interpolation.rotate.html
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.