torch.nn.functional.conv_transpose2d¶

Applies a 2D transposed convolution operator over an input image composed of several input planes, sometimes also called “deconvolution”.

This operator supports TensorFloat32.

See ConvTranspose2d for details and output shape.

Note

In some circumstances when given tensors on a CUDA device and using CuDNN, this operator may select a nondeterministic algorithm to increase performance. If this is undesirable, you can try to make the operation deterministic (potentially at a performance cost) by setting torch.backends.cudnn.deterministic = True. See Reproducibility for more information.

Parameters
• input – input tensor of shape $(\text{minibatch} , \text{in\_channels} , iH , iW)$

• weight – filters of shape $(\text{in\_channels} , \frac{\text{out\_channels}}{\text{groups}} , kH , kW)$

• bias – optional bias of shape $(\text{out\_channels})$. Default: None

• stride – the stride of the convolving kernel. Can be a single number or a tuple (sH, sW). Default: 1

• groups – split input into groups, $\text{in\_channels}$ should be divisible by the number of groups. Default: 1