Type IRaggedTensor
Namespace tensorflow
Interfaces ICompositeTensor
Methods
- bounding_shape
- nested_row_lengths
- nested_value_rowids
- nrows
- row_lengths
- row_limits
- row_starts
- to_list
- to_sparse
- to_tensor
- value_rowids
- with_flat_values
- with_row_splits_dtype
- with_values
Properties
Public instance methods
object bounding_shape(object axis, object name, object out_type)
object nested_row_lengths(object name)
object nested_value_rowids(object name)
object nrows(object out_type, object name)
object row_lengths(object axis, object name)
object row_limits(object name)
object row_starts(object name)
object to_list()
Returns a nested Python `list` with the values for this `RaggedTensor`. Requires that `rt` was constructed in eager execution mode.
Returns
-
object
- A nested Python `list`.
object to_sparse(object name)
object to_tensor(object default_value, object name)
object value_rowids(object name)
object with_flat_values(object new_values)
object with_row_splits_dtype(object dtype)
object with_values(object new_values)
Returns a copy of `self` with `values` replaced by `new_value`. Preserves cached row-partitioning tensors such as `self.cached_nrows` and
`self.cached_value_rowids` if they have values.
Parameters
-
object
new_values - Potentially ragged tensor to use as the `values` for the returned `RaggedTensor`. Must have `rank > 0`, and must have the same number of rows as `self.values`.
Returns
-
object
- A `RaggedTensor`. `result.rank = 1 + new_values.rank`. `result.ragged_rank = 1 + new_values.ragged_rank`