conv_filter_transpose2d#
- deepinv.physics.functional.conv_filter_transpose2d(x, y, filter_size, padding='circular', correlation=False)[source]#
Apply the adjoint of 2D convolution with respect to its filter.
Unlike
torch.nn.functional.conv_transpose2d(), which applies the adjoint with respect to the input image, this function applies the adjoint with respect to the filter, treatingxas fixed and mapping an adjoint outputyback to filter space. Although this result can be obtained withconv_transpose2dfollowed by cropping, computing only the requested filter support directly is more efficient.- 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 tox.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: