meddlr.ops.fftc#

meddlr.ops.fftc(input: Tensor, norm: str = 'ortho', is_real: Optional[bool] = None, channels_last=False)[source]#

Apply 1D centered Fast Fourier Transform (FFT).

Parameters
  • input (torch.Tensor) – A tensor.

  • norm (str | bool, optional) – The normalization method. Defaults to 'ortho'. For torch<1.7, only 'ortho' is supported.

  • is_real (bool, optional) – If True, input is a real-valued tensor. If None or False and input.shape[-1] == 2, input is a real-view of a complex tensor.

  • channels_last (bool, optional) – If True, apply to first non-batch dimensions. If False, apply to last dimension.

Returns

The 1D centered FFT of the input.

Return type

torch.Tensor