conv2d_fft
- class deepinv.physics.functional.conv2d_fft(x: Tensor, filter: Tensor, real_fft: bool = True)[source]
Bases:
A helper function performing the 2d convolution of images
x
andfilter
using FFT. The adjoint of this operation isdeepinv.physics.functional.conv_transposed2d_fft()
- Parameters:
x (torch.Tensor) – Image of size
(B, C, W, H)
.filter (torch.Tensor) – Filter of size
(b, c, w, h)
whereb
can be either1
orB
andc
can be either1
orC
.
If
b = 1
orc = 1
, then this function supports broadcasting as the same as numpy. Otherwise, each channel of each image is convolved with the corresponding kernel.For convolution using FFT consider only
'circular'
padding (i.e., circular convolution).- ..note:
The convolution here is a convolution, not a correlation as in conv2d.
- Returns:
torch.Tensor : the output of the convolution of the shape size as \(x\)