---
title: "convTranspose2d"
sidebar_label: "convTranspose2d"
description: "Kotlin binding reference: convTranspose2d."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[convTranspose2d](convTranspose2d.md)

# convTranspose2d

[common]\
fun [convTranspose2d](convTranspose2d.md)(input: [Tensor](../Tensor/index.md), weight: [Tensor](../Tensor/index.md), bias: [Tensor](../Tensor/index.md)? = null, stride: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(1, 1), padding: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(0, 0, 0, 0), outputPadding: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(0, 0), groups: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 1, dilation: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(1, 1), activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`convTranspose2d(input: Tensor, weight: Tensor, bias: Tensor? = null, stride: LongArray = longArrayOf(1, 1), padding: LongArray = longArrayOf(0, 0, 0, 0), outputPadding: LongArray = longArrayOf(0, 0), groups: Long = 1L, dilation: LongArray = longArrayOf(1, 1), activation: Activation = Activation.IDENTITY)`: the `conv_transpose2d` operator. 2-D transposed (fractionally-strided) convolution (learnable upsampling). Layout is channels-last; the WEIGHT is the transpose-flip of `conv`'s: input-channel-first `[C_in, K.., O/groups]`; `C_in == weight[0]` and `C_out == weight[-1] * groups` (the cuDNN-BackwardData / ONNX convention, NOT conv's OHWI). `padding` is per-side: two entries (lo, hi) per spatial dim. `output_padding` grows only the output's high side.