ClikaRT::ops::index_select
function
index_select()
Select whole rows of x at index positions along dim.
Output = x's shape with the dim extent replaced by index's length; rows may repeat and appear in any order. index is 1-D Int32/Int64; prefer Int32 where the extents allow (half the index bytes).
Throws
ClikaRT::Error: (INVALID_ARGUMENT) whendimis out of range or the index dtype is wrong (code_name()carries the reason).
Returns: a new tensor: x's shape with dim resized to index's length.
auto rows = ClikaRT::ops::index_select(table, 0, ids); // [n_ids, ..]
Declared in ClikaRT/compute/ops.h, line 2485