T - data type for sparseValues() outputpublic final class RaggedTensorToSparse<T> extends PrimitiveOp
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)
operation| Modifier and Type | Method and Description |
|---|---|
static <T> RaggedTensorToSparse<T> |
create(Scope scope,
Iterable<Operand<Long>> rtNestedSplits,
Operand<T> rtDenseValues)
Factory method to create a class to wrap a new RaggedTensorToSparse operation to the graph.
|
Output<Long> |
sparseDenseShape()
`sparse_dense_shape` is a tight bounding box of the input `RaggedTensor`.
|
Output<Long> |
sparseIndices()
The indices for the `SparseTensor`.
|
Output<T> |
sparseValues()
The values of the `SparseTensor`.
|
equals, hashCode, toStringpublic static <T> RaggedTensorToSparse<T> create(Scope scope, Iterable<Operand<Long>> rtNestedSplits, Operand<T> rtDenseValues)
scope - current graph scopertNestedSplits - The `row_splits` for the `RaggedTensor`.rtDenseValues - The `flat_values` for the `RaggedTensor`.Copyright © 2015–2019. All rights reserved.