tf.raw_ops.RaggedGather
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
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.
- indicesia a dense tensor with dtype- int32or- 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 Tensorobjects with the same type in:int32,int64.
Thenested_row_splitstensors that define the row-partitioning for theparamsRaggedTensor input. | 
| params_dense_values | A Tensor.
Theflat_valuesfor theparamsRaggedTensor. 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 ofparamsof the values that should be
gathered. | 
| OUTPUT_RAGGED_RANK | An intthat is>= 0.
The ragged rank of the output RaggedTensor.output_nested_splitswill contain
this number ofrow_splitstensors. This value should equalindices.shape.ndims + params.ragged_rank - 1. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| A tuple of Tensorobjects (output_nested_splits, output_dense_values). | 
| output_nested_splits | A list of OUTPUT_RAGGED_RANKTensorobjects with the same type asparams_nested_splits. | 
| output_dense_values | A Tensor. Has the same type asparams_dense_values. | 
  
  
 
  
    
    
      
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
  Last updated 2022-10-27 UTC.
  
  
  
    
      [null,null,["Last updated 2022-10-27 UTC."],[],[]]