Mojo function
conv_shape
conv_shape[input_type: DType, filter_type: DType, strides_type: DType, dilations_type: DType, paddings_type: DType](input_buf: TileTensor[input_type, input_buf.LayoutType, input_buf.origin, linear_idx_type=input_buf.linear_idx_type, element_size=input_buf.element_size], filter_buf: TileTensor[filter_type, filter_buf.LayoutType, filter_buf.origin, linear_idx_type=filter_buf.linear_idx_type, element_size=filter_buf.element_size], strides_buf: TileTensor[strides_type, strides_buf.LayoutType, strides_buf.origin, linear_idx_type=strides_buf.linear_idx_type, element_size=strides_buf.element_size], dilations_buf: TileTensor[dilations_type, dilations_buf.LayoutType, dilations_buf.origin, linear_idx_type=dilations_buf.linear_idx_type, element_size=dilations_buf.element_size], paddings_buf: TileTensor[paddings_type, paddings_buf.LayoutType, paddings_buf.origin, linear_idx_type=paddings_buf.linear_idx_type, element_size=paddings_buf.element_size], num_groups_scalar: Scalar[num_groups_scalar.dtype]) -> IndexList[TileTensor[input_type, input_buf.LayoutType, input_buf.origin, linear_idx_type=input_buf.linear_idx_type, element_size=input_buf.element_size].flat_rank]
Compute the output shape of a conv operation, and assert the inputs are compatible.
Parameters:
- input_type (
DType): Type of the input tensor. - filter_type (
DType): Type of the filter tensor. - strides_type (
DType): Type of the strides tensor. - dilations_type (
DType): Type of the dilations tensor. - paddings_type (
DType): Type of the paddings tensor.
Args:
- input_buf (
TileTensor): The input tensor. - filter_buf (
TileTensor): The filter tensor. - strides_buf (
TileTensor): The strides tensor. - dilations_buf (
TileTensor): The dilations tensor. - paddings_buf (
TileTensor): The paddings tensor. - num_groups_scalar (
Scalar): The num_groups scalar.
Returns:
IndexList: The output shape.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!