Method Slice
Slice<T>(T, ReadOnlySpan<int>, ReadOnlySpan<int>, ReadOnlySpan<int>, ReadOnlySpan<int>)
Calculates an output tensor by slicing the input tensor along given axes with given starts, ends, and steps.
Declaration
public T Slice<T>(T X, ReadOnlySpan<int> starts, ReadOnlySpan<int> ends, ReadOnlySpan<int> axes, ReadOnlySpan<int> steps) where T : Tensor
Parameters
| Type | Name | Description |
|---|---|---|
| T | X | The input tensor. |
| ReadOnlySpan<int> | starts | The start index along each axis. |
| ReadOnlySpan<int> | ends | The end index along each axis. |
| ReadOnlySpan<int> | axes | The axes along which to slice. If this is |
| ReadOnlySpan<int> | steps | The step values for slicing. If this is |
Returns
| Type | Description |
|---|---|
| T | The computed output tensor. |
Type Parameters
| Name | Description |
|---|---|
| T | The tensor type of the input and output tensors. |