torch.fft.ifftshift¶
- torch.fft.ifftshift(input, dim=None) Tensor ¶
fftshift()
的反函數。- 參數
範例
>>> f = torch.fft.fftfreq(5) >>> f tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])
經過
fftshift()
和ifftshift()
的往返會得到相同的結果>>> shifted = torch.fft.fftshift(f) >>> torch.fft.ifftshift(shifted) tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])