I have written  fftshift  and  ifftshift  operations as part of my Complex Steerable Pyramid implementation: https://github.com/tomrunia/PyTorchSteerablePyramid 339
(see the  steerable/math_utils.py  file)