segment

fun segment(block: SegmentBuilder<T, V>.() -> Slice<T, V>)(source)

Defines slicing for the next dimension using the provided block.

Each call to segment configures slicing for one dimension of the tensor. The dimensions are configured in order, starting from dimension 0.

Parameters

block

the configuration block that defines the slice for this dimension