快捷方式

torch.fft.ifftshift

torch.fft.ifftshift(input, dim=None) Tensor

fftshift() 的逆操作。

引數
  • input (Tensor) – FFT 順序的 tensor

  • dim (int, Tuple[int], optional) – 需要重新排列的維度。只有在此指定的維度會被重新排列,其他維度將保持原始順序。預設值:input 的所有維度。

示例

>>> 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])

文件

訪問 PyTorch 全面的開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得解答

檢視資源