sliceAt
Convenience method for extracting specific indices across dimensions.
This method enables quick extraction of specific slices by providing individual indices for each dimension, which is useful for accessing specific samples, channels, or spatial locations.
Usage Example
// Extract specific batch=0, channel=3 from NCHW tensor (reduces to HW)
val view = tensor.sliceAt(0, 3) // Results in 2D tensorContent copied to clipboard
Return
a TensorView with reduced dimensionality
Parameters
indices
the specific indices to select for each dimension
Throws
if index count doesn't match tensor rank