class_docstr: Two dimensional transposed convolution (aka. deconvolution).
class_docstr_tok: ["Two","dimensional","transposed","convolution","(","aka",".","deconvolution",")","."]
docstr: Initializes the module.
  
  Args:
    output_channels: Number of output channels.
    kernel_shape: The shape of the kernel. Either an integer or a sequence of
      length 2.
    stride: Optional stride for the kernel. Either an integer or a sequence of
      length 2. Defaults to 1.
    output_shape: Output shape of the spatial dimensions of a transpose
      convolution. Can be either an integer or an iterable of integers. If a
      `None` value is given, a default shape is automatically calculated.
    padding: Optional padding algorithm. Either ``VALID`` or ``SAME``.
      Defaults to ``SAME``. See:
      https://www.tensorflow.org/xla/operation_semantics#conv_convolution.
    with_bias: Whether to add a bias. By default, true.
    w_init: Optional weight initialization. By default, truncated normal.
    b_init: Optional bias initialization. By default, zeros.
    data_format: The data format of the input. Either ``NHWC`` or ``NCHW``. By
      default, ``NHWC``.
    mask: Optional mask of the weights.
    name: The name of the module.
docstr_tok: ["Initializes","the","module",".","Args",":","output_channels",":","Number","of","output","channels",".","kernel_shape",":","The","shape","of","the","kernel",".","Either","an","integer","or","a","sequence","of","length","2.","stride",":","Optional","stride","for","the","kernel",".","Either","an","integer","or","a","sequence","of","length","2",".","Defaults","to","1.","output_shape",":","Output","shape","of","the","spatial","dimensions","of","a","transpose","convolution",".","Can","be","either","an","integer","or","an","iterable","of","integers",".","If","a","`","None","`","value","is","given",",","a","default","shape","is","automatically","calculated",".","padding",":","Optional","padding","algorithm",".","Either","``","VALID","``","or","``","SAME","``",".","Defaults","to","``","SAME","``",".","See",":","https",":","\/\/www.tensorflow.org\/xla\/operation_semantics","#","conv_convolution",".","with_bias",":","Whether","to","add","a","bias",".","By","default",",","true",".","w_init",":","Optional","weight","initialization",".","By","default",",","truncated","normal",".","b_init",":","Optional","bias","initialization",".","By","default",",","zeros",".","data_format",":","The","data","format","of","the","input",".","Either","``","NHWC","``","or","``","NCHW","``",".","By","default",",","``","NHWC","``",".","mask",":","Optional","mask","of","the","weights",".","name",":","The","name","of","the","module","."]
code: def __init__(
      self,
      output_channels: int,
      kernel_shape: Union[int, Sequence[int]],
      stride: Union[int, Sequence[int]] = 1,
      output_shape: Optional[Union[int, Sequence[int]]] = None,
      padding: Union[str, Sequence[tuple[int, int]]] = "SAME",
      with_bias: bool = True,
      w_init: Optional[hk.initializers.Initializer] = None,
      b_init: Optional[hk.initializers.Initializer] = None,
      data_format: str = "NHWC",
      mask: Optional[jax.Array] = None,
      name: Optional[str] = None,
  ):
      """Initializes the module.
  
      Args:
        output_channels: Number of output channels.
        kernel_shape: The shape of the kernel. Either an integer or a sequence of
          length 2.
        stride: Optional stride for the kernel. Either an integer or a sequence of
          length 2. Defaults to 1.
        output_shape: Output shape of the spatial dimensions of a transpose
          convolution. Can be either an integer or an iterable of integers. If a
          `None` value is given, a default shape is automatically calculated.
        padding: Optional padding algorithm. Either ``VALID`` or ``SAME``.
          Defaults to ``SAME``. See:
          https://www.tensorflow.org/xla/operation_semantics#conv_convolution.
        with_bias: Whether to add a bias. By default, true.
        w_init: Optional weight initialization. By default, truncated normal.
        b_init: Optional bias initialization. By default, zeros.
        data_format: The data format of the input. Either ``NHWC`` or ``NCHW``. By
          default, ``NHWC``.
        mask: Optional mask of the weights.
        name: The name of the module.
      """
      super().__init__(
          num_spatial_dims=2,
          output_channels=output_channels,
          kernel_shape=kernel_shape,
          stride=stride,
          output_shape=output_shape,
          padding=padding,
          with_bias=with_bias,
          w_init=w_init,
          b_init=b_init,
          data_format=data_format,
          mask=mask,
          name=name,
      )
  
imports: from collections.abc import Sequence
  from typing import Optional, Union
  from haiku._src import base
  from haiku._src import initializers
  from haiku._src import module
  from haiku._src import pad
  from haiku._src import utils
  import jax
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 to create a new Conv2DTranspose object from inherited base classes: ConvNDTranspose with example: obj = Conv2DTranspose(output_channels, kernel_shape, stride, output_shape, padding, with_bias, w_init, b_init, data_format, mask, name)