IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

concat_shape_impl

def concat_shape_impl[Ins: TypeList[Ins.values], //](axis0: Int, inputs: TensorTuple[*Ins.values]) -> IndexList[Ins.values[0].rank]

Computes the concatenated output shape from the input tensor shapes.

Parameters:

  • โ€‹Ins (TypeList[values]): Types of the input tensors, which must share a rank.

Args:

  • โ€‹axis0 (Int): Axis along which to concatenate; negative values index from the last dimension.
  • โ€‹inputs (TensorTuple[*Ins.values]): Input tensors to concatenate, all matching in shape except along the concat axis.

Returns:

IndexList[Ins.values[0].rank]: The output shape with the concat axis dimension summed across all inputs.

Was this page helpful?