快捷键

torch.fft.ifftshift

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

fftshift() 的逆。

参数:
  • input (Tensor) – FFT 顺序的张量

  • dim(int,Tuple[int],可选)- 要重新排列的维度。只有在此处指定的维度将被重新排列,其他维度将保持原始顺序。默认: 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 贡献者。

使用 Sphinx 构建,并使用 Read the Docs 提供的主题。

文档

PyTorch 的全面开发者文档

查看文档

教程

深入了解初学者和高级开发者的教程

查看教程

资源

查找开发资源并获得您的疑问解答

查看资源