conv_transpose2d#
- deepinv.physics.functional.conv_transpose2d(y, filter, padding='valid', correlation=False)[source]#
A helper function performing the 2d transposed convolution 2d of x and filter. The transposed of this operation is
deepinv.physics.functional.conv2d()- Parameters:
x (torch.Tensor) – Image of size
(B, C, W, H).filter (torch.Tensor) – Filter of size
(b, c, w, h)) wherebcan be either1orBandccan be either1orC.correlation (bool) – choose True if you want a cross-correlation (default
False) Ifb = 1orc = 1, then this function supports broadcasting as the same as numpy. Otherwise, each channel of each image is convolved with the corresponding kernel.padding (str) – options are
'valid','circular','replicate','reflect','constant'or'zeros'. Ifpadding='valid'the output is larger than the image (padding) the output has the same size as the image. Note that'constant'and'zeros'are equivalent. Default is'valid'.
- Returns:
torch.Tensor: the output- Return type:
Note
This functions gives the same result as
deepinv.physics.functional.conv_transpose2d_fft(). However, for small kernels, this function is faster. For large kernels,deepinv.physics.functional.conv_transpose2d_fft()is usually faster but requires more memory.