Mojo function
concat
concat(values: List[Symbol, 0], axis: Int = 0, out_dim: Optional[Dim] = #kgen.none) -> Symbol
Concatenates a list of symbolic tensors along an axis.
Args:
- values (
List[Symbol, 0]
): A list of symbolic tensor values. Each tensor must have the same dtype and rank, and must have the same dimension size for each dimension other thanaxis
. - axis (
Int
): The axis to concatenate along. If negative, indexes relative to the end of the tensor shape. For instance,concat(vs, -1)
will concat along the last dimension. - out_dim (
Optional[Dim]
): The expected output dimension of the concataxis
. This will be assert at graph execution time to be correct.
Returns:
A new symbolic tensor representing the concatenation result. It will have the same rank as each input tensor, and its dimenions will be the same as each input tensor's for each dimension other than axis
, which will have size equal to the sum of all tensor's size for that dimension.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?