flatten

fun <I, T : DType, V> Transform<I, Tensor<T, V>>.flatten(ctx: ExecutionContext, startDim: Int = 0, endDim: Int = -1): Transform<I, Tensor<T, V>>(source)

Chains a Flatten transform.

Parameters

ctx

The execution context

startDim

First dimension to flatten (default: 0)

endDim

Last dimension to flatten (default: -1)