{ }
Create a dense tensor from a ragged tensor, possibly altering its shape.
tf.raw_ops.RaggedTensorToTensor(
shape,
values,
default_value,
row_partition_tensors,
row_partition_types,
name=None
)
The ragged_to_dense
op creates a dense tensor from a list of row partition
tensors, a value vector, and default values. If the shape is unspecified, the
minimal shape required to contain all the elements in the ragged tensor (the
natural shape) will be used. If some dimensions are left unspecified, then the
size of the natural shape is used in that dimension.
The default_value will be broadcast to the output shape. After that, the values from the ragged tensor overwrite the default values. Note that the default_value must have less dimensions than the value.
The row partition tensors are in the order of the dimensions. At present, the types can be:
- "ROW_SPLITS": the row_splits tensor from the ragged tensor.
- "VALUE_ROWIDS": the value_rowids tensor from the ragged tensor.
- "FIRST_DIM_SIZE": if value_rowids is used for the first dimension, then it is preceded by "FIRST_DIM_SIZE".
Returns | |
---|---|
A Tensor . Has the same type as values .
|