conv_transpose2d#
- class deepinv.physics.functional.conv_transpose2d(y: Tensor, filter: Tensor, padding: str = 'valid', correlation=False)[source]#
Bases:
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)
) whereb
can be either1
orB
andc
can be either1
orC
.correlation (bool) – choose True if you want a cross-correlation (default False)
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.- Parameters:
padding (str) – options are
'valid'
,'circular'
,'replicate'
and'reflect'
. Ifpadding='valid'
the blurred output is smaller than the image (no padding) otherwise the blurred output has the same size as the image.- Returns:
(torch.Tensor) : the output