RaggedTensorToSparse

public final class RaggedTensorToSparse

Converts a `RaggedTensor` into a `SparseTensor` with the same values.

input=ragged.from_nested_row_splits(rt_dense_values, rt_nested_splits) output=SparseTensor(indices=sparse_indices, values=sparse_values, dense_shape=sparse_dense_shape)

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static <U extends TType, T extends TNumber> RaggedTensorToSparse<U>
create(Scope scope, Iterable<Operand<T>> rtNestedSplits, Operand<U> rtDenseValues)
Factory method to create a class wrapping a new RaggedTensorToSparse operation.
Output<TInt64>
sparseDenseShape()
`sparse_dense_shape` is a tight bounding box of the input `RaggedTensor`.
Output<TInt64>
sparseIndices()
The indices for the `SparseTensor`.
Output<U>
sparseValues()
The values of the `SparseTensor`.

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "RaggedTensorToSparse"

Public Methods

public static RaggedTensorToSparse<U> create (Scope scope, Iterable<Operand<T>> rtNestedSplits, Operand<U> rtDenseValues)

Factory method to create a class wrapping a new RaggedTensorToSparse operation.

Parameters
scope current scope
rtNestedSplits The `row_splits` for the `RaggedTensor`.
rtDenseValues The `flat_values` for the `RaggedTensor`.
Returns
  • a new instance of RaggedTensorToSparse

public Output<TInt64> sparseDenseShape ()

`sparse_dense_shape` is a tight bounding box of the input `RaggedTensor`.

public Output<TInt64> sparseIndices ()

The indices for the `SparseTensor`.

public Output<U> sparseValues ()

The values of the `SparseTensor`.