unfold

abstract fun <T : DType, V> unfold(tensor: Tensor<T, V>, dim: Int, size: Int, step: Int): Tensor<T, V>(source)

Extract sliding windows of size size along dimension dim with stride step. Result has one extra dimension appended containing the window elements.