Python wrappers
Public Python APIs implemented by this engine symbols.- py
lucid.nn.ConvTranspose1dclass - py
lucid.nn.quantized.ConvTranspose1dclass - py
lucid.peft.tuners.lora.ConvTranspose1dclass - py
lucid.nn.functional.conv_transpose1dfunction - py
lucid.nn.ConvTranspose2dclass - py
lucid.nn.quantized.ConvTranspose2dclass - py
lucid.peft.tuners.lora.ConvTranspose2dclass - py
lucid.nn.functional.conv_transpose2dfunction - py
lucid.nn.ConvTranspose3dclass - py
lucid.nn.quantized.ConvTranspose3dclass - py
lucid.peft.tuners.lora.ConvTranspose3dclass - py
lucid.nn.functional.conv_transpose3dfunction
Autograd node for the N-dimensional transposed convolution.
Backward of this op is itself a regular convolution against the same
weights, so the implementation reuses the ConvNdBackward kernels
for dx and the matching im2col path for dW.
Attributes
schema_ v1OpSchema"conv_transpose1d" / "conv_transpose2d" / "conv_transpose3d") with AmpPolicy::Promote.stride_int[N]> 1 interleaves implicit zeros between input elements.pad_int[N]dilation * (K - 1) - padding zero-padding removed from the output.opad_int[N]stride along each axis.dilation_int[N]groups_intgroups_ == C_in is the depthwise case used by efficient decoder heads.Static methods
1forward
→TensorImplPtrint forward(const int & x, const int & W, const int & b, const int (&)[N] stride, const int (&)[N] pad, const int (&)[N] opad, const int (&)[N] dilation, int groups)Run the forward transposed convolution and attach the backward node.
Parameters
xTensorImplPtr(B, C_in, S_0, ..., S_{N-1}).WTensorImplPtr(C_in, C_out / groups, K_0, ..., K_{N-1}). The leading axis is C_in — this is the transposed layout relative to ConvNdBackward.bTensorImplPtr(C_out,) or empty for bias-less variants.stridearray<int, N>padarray<int, N>opadarray<int, N>opad[i] < stride[i].dilationarray<int, N>groupsintC_in and C_out must both be divisible by it, and W's second axis is C_out / groups.Returns
TensorImplPtrOutput of shape (B, C_out, O_0, ..., O_{N-1}) where each extent is .
Raises
ShapeMismatchN + 2, if W's leading axis does not match C_in, if C_in is not divisible by groups, if b is not 1-D of length C_out, or if a computed output extent is non-positive.DeviceMismatchx, W, b do not all live on the same device.Methods
2Backward — compute [dx, dW, db] for the three saved inputs.
The gradient w.r.t. x is a regular ConvNd against W
(the transposed-conv's adjoint is a forward conv). dW is
obtained via the matching im2col path against the saved input,
and db via a channel-wise reduction.
Parameters
grad_ outStorageReturns
vector<Storage>Gradients in declaration order: dx, dW, db.
Graph-mode backward (create_graph=True): the same three gradients built from differentiable ops, so they can be differentiated again.