Function torch ::stable::select#
Defined in File ops.h
Function Documentation#
-
inline torch::stable::Tensor torch::stable::select(const torch::stable::Tensor &self, int64_t dim, int64_t index)#
Stable version of the select.int op.
Slices the input tensor along the specified dimension at the given index. This function returns a view of the original tensor with the given dimension removed.
Minimum compatible version: PyTorch 2.9.
Note
The index parameter is typed header-only.
- Parameters:
self – The input tensor.
dim – The dimension to slice.
index – The index to select along the dimension.
- Returns:
A tensor with one fewer dimension.