conv_filter_transpose2d_fft#

deepinv.physics.functional.conv_filter_transpose2d_fft(x, y, filter_size, real_fft=True, padding='circular', correlation=False)[source]#

Apply the adjoint of 2D convolution with respect to its filter using FFTs.

This function gives the same result as deepinv.physics.functional.conv_filter_transpose2d(). It is generally faster for large filter supports, while the non-fft version is faster for small filters.

Parameters:
  • x (torch.Tensor) – Input tensor of shape (B, C, H, W).

  • y (torch.Tensor) – Adjoint input. Its spatial shape must match the output of deepinv.physics.functional.conv2d() applied to x.

  • filter_size (tuple[int, int]) – Filter size (H_f, W_f).

  • real_fft (bool) – Use real FFTs for real-valued inputs.

  • padding (str) – One of "valid", "circular", "replicate", "reflect", "constant" or "zeros".

  • correlation (bool) – If True, return the filter adjoint of cross-correlation rather than convolution.

Returns:

Per-channel filter adjoint of shape (B, C, H_f, W_f).

Return type:

Tensor