U - data type for outputNestedSplits() outputT - data type for outputDenseValues() outputpublic final class RaggedTensorFromVariant<U extends Number,T> extends PrimitiveOp
Decodes the given `variant` Tensor and returns a `RaggedTensor`. The input could be a scalar, meaning it encodes a single `RaggedTensor` with ragged_rank `output_ragged_rank`. It could also have an arbitrary rank, in which case each element is decoded into a `RaggedTensor` with ragged_rank `input_ragged_rank` and these are then stacked according to the input shape to output a single `RaggedTensor` with ragged_rank `output_ragged_rank`. Each `variant` element in the input Tensor is decoded by retrieving from the element a 1-D `variant` Tensor with `input_ragged_rank + 1` Tensors, corresponding to the splits and values of the decoded `RaggedTensor`. If `input_ragged_rank` is -1, then it is inferred as `output_ragged_rank` - `rank(encoded_ragged)`. See `RaggedTensorToVariant` for the corresponding encoding logic.
operation| Modifier and Type | Method and Description |
|---|---|
static <U extends Number,T> |
create(Scope scope,
Operand<?> encodedRagged,
Long inputRaggedRank,
Long outputRaggedRank,
Class<T> Tvalues,
Class<U> Tsplits)
Factory method to create a class wrapping a new RaggedTensorFromVariant operation.
|
Output<T> |
outputDenseValues()
A Tensor representing the values of the output `RaggedTensor`.
|
List<Output<U>> |
outputNestedSplits()
A list of one or more Tensors representing the splits of the output
`RaggedTensor`.
|
equals, hashCode, op, toStringpublic static <U extends Number,T> RaggedTensorFromVariant<U,T> create(Scope scope, Operand<?> encodedRagged, Long inputRaggedRank, Long outputRaggedRank, Class<T> Tvalues, Class<U> Tsplits)
scope - current scopeencodedRagged - A `variant` Tensor containing encoded `RaggedTensor`s.inputRaggedRank - The ragged rank of each encoded `RaggedTensor` component in the input. If set to
-1, this is inferred as `output_ragged_rank` - `rank(encoded_ragged)`outputRaggedRank - The expected ragged rank of the output `RaggedTensor`. The following must hold:
`output_ragged_rank = rank(encoded_ragged) + input_ragged_rank`.Tvalues - Tsplits - public List<Output<U>> outputNestedSplits()
Copyright © 2015–2019. All rights reserved.