Skip to main content
Log in

Mojo function

conv_transpose_shape

conv_transpose_shape[input_rank: Int, kernel_rank: Int, type: DType, strides_type: DType, dilations_type: DType, pads_type: DType, output_pads_type: DType, single_thread_blocking_override: Bool](input: NDBuffer[type, input_rank, origin], kernel: NDBuffer[type, kernel_rank, origin], strides: NDBuffer[strides_type, 1, origin], dilations: NDBuffer[dilations_type, 1, origin], pads: NDBuffer[pads_type, 1, origin], output_pads: NDBuffer[output_pads_type, 1, origin]) -> Index[input_rank]

Compute the output shape of a conv-transpose operation, and assert the inputs are compatible.

Parameters:

  • input_rank (Int): Rank of the input tensor.
  • kernel_rank (Int): Rank of the kernel tensor.
  • type (DType): Element type of the input and kernel tensor.
  • strides_type (DType): Element type of the strides tensor.
  • dilations_type (DType): Element type of the dilations tensor.
  • pads_type (DType): Element type of the pads tensor.
  • output_pads_type (DType): Element type of the output_pads tensor.
  • single_thread_blocking_override (Bool): If True, then the operation is run synchronously using a single thread.

Args:

  • input (NDBuffer[type, input_rank, origin]): The input tensor.
  • kernel (NDBuffer[type, kernel_rank, origin]): The kernel tensor.
  • strides (NDBuffer[strides_type, 1, origin]): The strides tensor.
  • dilations (NDBuffer[dilations_type, 1, origin]): The dilations tensor.
  • pads (NDBuffer[pads_type, 1, origin]): The paddings tensor.
  • output_pads (NDBuffer[output_pads_type, 1, origin]): The output paddings tensor.

Returns:

The output shape.