Skip to main content
Log in

Mojo function

conv_transpose_naive

conv_transpose_naive[type: DType](output: NDBuffer[type, 5, MutableAnyOrigin], input: NDBuffer[type, 5, MutableAnyOrigin], filter: NDBuffer[type, 5, MutableAnyOrigin], stride: IndexList[3], dilation: IndexList[3], pad_d: IndexList[2], pad_h: IndexList[2], pad_w: IndexList[2])

Implements the ConvTranspose operator from the MO spec.

Parameters:

  • type (DType): Type of the input, output, and kernel tensors.

Args:

  • output (NDBuffer[type, 5, MutableAnyOrigin]): Output data tensor that contains the result of the convolution.
  • input (NDBuffer[type, 5, MutableAnyOrigin]): Input data tensor from previous layer, with size of (N x H x W x C), where N is the batch size, C is the number of channels, and H and W are the height and width.
  • filter (NDBuffer[type, 5, MutableAnyOrigin]): The weight (kernel) tensor, with size of (kH x kW x M/groups x C), where C is the number of channels, kH and kW are the height and width of the kernel, and M is the number of feature maps.
  • stride (IndexList[3]): Stride along each spatial axis.
  • dilation (IndexList[3]): Dilation value along each spatial axis of the filter.
  • pad_d (IndexList[2]): Padding in depth dimension.
  • pad_h (IndexList[2]): Padding in height dimension.
  • pad_w (IndexList[2]): Padding in width dimension.