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 dtype int32 or int64, 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.)
Args
params_nested_splits
A list of at least 1 Tensor objects with the same type in: int32, int64.
The nested_row_splits tensors that define the row-partitioning for the
params RaggedTensor input.
params_dense_values
A Tensor.
The flat_values for the params RaggedTensor. There was a terminology change
at the python level from dense_values to flat_values, so dense_values is the
deprecated name.
indices
A Tensor. Must be one of the following types: int32, int64.
Indices in the outermost dimension of params of the values that should be
gathered.
OUTPUT_RAGGED_RANK
An int that is >= 0.
The ragged rank of the output RaggedTensor. output_nested_splits will contain
this number of row_splits tensors. This value should equal
indices.shape.ndims + params.ragged_rank - 1.
name
A name for the operation (optional).
Returns
A tuple of Tensor objects (output_nested_splits, output_dense_values).
output_nested_splits
A list of OUTPUT_RAGGED_RANKTensor objects with the same type as params_nested_splits.
output_dense_values
A Tensor. Has the same type as params_dense_values.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[]]