{ }
Gather ragged slices from params
axis 0
according to indices
.
tf.raw_ops.RaggedGather(
params_nested_splits,
params_dense_values,
indices,
OUTPUT_RAGGED_RANK,
name=None
)
Outputs a RaggedTensor
output composed from output_dense_values
and
output_nested_splits
, such that:
output.shape = indices.shape + params.shape[1:]
output.ragged_rank = indices.shape.ndims + params.ragged_rank
output[i...j, d0...dn] = params[indices[i...j], d0...dn]
where
params = ragged.from_nested_row_splits(params_dense_values, params_nested_splits)
provides the values that should be gathered.indices
ia a dense tensor with dtypeint32
orint64
, indicating which values should be gathered.output = ragged.from_nested_row_splits(output_dense_values, output_nested_splits)
is the output tensor.
(Note: This c++ op is used to implement the higher-level python
tf.ragged.gather
op, which also supports ragged indices.)