squeeze

fun <I, T : DType, V> Transform<I, Tensor<T, V>>.squeeze(ctx: ExecutionContext, dim: Int? = null): Transform<I, Tensor<T, V>>(source)

Chains a Squeeze transform that removes size-1 dimensions.

Parameters

ctx

The execution context

dim

The dimension to remove, or null to remove all size-1 dimensions