# RaggedTensorFromVariant

public final class **RaggedTensorFromVariant** Decodes a \`variant\` Tensor into a \`RaggedTensor\`.


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.

<br />

### Public Methods

|---|---|
| static \<T\> [RaggedTensorFromVariant](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant)\<Long, T\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<?>,%20java.lang.Long,%20java.lang.Long,%20java.lang.Class<T>))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\> encodedRagged, Long inputRaggedRank, Long outputRaggedRank, Class\<T\> Tvalues) Factory method to create a class wrapping a new RaggedTensorFromVariant operation using default output types. |
| static \<U extends Number, T\> [RaggedTensorFromVariant](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant)\<U, T\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<?>,%20java.lang.Long,%20java.lang.Long,%20java.lang.Class<T>,%20java.lang.Class<U>))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\> encodedRagged, Long inputRaggedRank, Long outputRaggedRank, Class\<T\> Tvalues, Class\<U\> Tsplits) Factory method to create a class wrapping a new RaggedTensorFromVariant operation. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [outputDenseValues](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant#outputDenseValues())() A Tensor representing the values of the output \`RaggedTensor\`. |
| List\<[Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>\> | [outputNestedSplits](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant#outputNestedSplits())() A list of one or more Tensors representing the splits of the output \`RaggedTensor\`. |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Methods

#### public static [RaggedTensorFromVariant](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant)\<Long, T\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\> encodedRagged, Long inputRaggedRank, Long outputRaggedRank, Class\<T\> Tvalues)

Factory method to create a class wrapping a new RaggedTensorFromVariant operation using default output types.

##### Parameters

| scope | current scope |
| encodedRagged | 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\`. |
|---|---|

##### Returns

- a new instance of RaggedTensorFromVariant

#### public static [RaggedTensorFromVariant](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedTensorFromVariant)\<U, T\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\> encodedRagged, Long inputRaggedRank, Long outputRaggedRank, Class\<T\> Tvalues, Class\<U\> Tsplits)

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

##### Parameters

| scope | current scope |
| encodedRagged | 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\`. |
|---|---|

##### Returns

- a new instance of RaggedTensorFromVariant

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>
**outputDenseValues**
()

A Tensor representing the values of the output \`RaggedTensor\`.

#### public List\<[Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>\>
**outputNestedSplits**
()

A list of one or more Tensors representing the splits of the output
\`RaggedTensor\`.