fn
conv_transpose2d_op
→TensorImplPtrint conv_transpose2d_op(const int & x, const int & W, const int & b, int stride_h, int stride_w, int pad_h, int pad_w, int opad_h, int opad_w)Python wrappers
Public Python APIs implemented by this engine symbol.Two-dimensional transposed convolution (fractionally-strided conv).
The 2-D upsampling primitive used by VAE / GAN decoders, U-Net expansion paths, and super-resolution heads. Equivalent to the gradient of a 2-D convolution w.r.t. its input.
Parameters
xTensorImplPtrInput of shape
(B, C_in, H, W).WTensorImplPtrFilters of shape
(C_in, C_out, KH, KW).bTensorImplPtrBias of shape
(C_out,) or empty.stride_h, stride_wint= NonePer-axis upsampling factor. Default:
1.pad_h, pad_wint= NonePer-axis padding subtracted from the output extent. Default:
0.opad_h, opad_wint= NonePer-axis one-sided output padding. Default:
0.Returns
TensorImplPtrOutput of shape (B, C_out, H_out, W_out) with and analogously for .
Notes
When stride > 1 and kernel_size is not divisible by
stride the output can exhibit characteristic checkerboard
artefacts. A common mitigation is to choose
kernel_size = stride * n or to substitute bilinear upsampling
followed by a regular convolution.