concat

fun DTensor.concat(right: DTensor, axis: Int): DTensor

Concatenate two tensors along the provided axis.

The shape of the inputs must match except at the provided axis. The shape of the result are the same as those of the inputs, except at the provided axis, where it is the sum of the dimensions of the inputs at the provided axis.

Example: val x = tensorOf(listOf(3, 4, 5), { ... }) val y = tensorOf(listOf(3, 6, 5), { ... }) x.concat(y, axis = 1) // dimensions are (3, 10, 5)


fun DTensor.concat(right: DTensor): DTensor
fun FloatTensor.concat(right: FloatTensor, axis: Int = 0): FloatTensor
fun concat(slices: List<DTensor>, axis: Int = 0): DTensor