All scalar values in pylist must have the same nesting depth K, and the
returned RaggedTensorValue will have rank K. If pylist contains no
scalar values, then K is one greater than the maximum depth of empty lists
in pylist. All scalar values in pylist must be compatible with dtype.
Args
pylist
A nested list, tuple or np.ndarray. Any nested element that
is not a list or tuple must be a scalar value compatible with dtype.
dtype
numpy.dtype. The type of elements for the returned RaggedTensor.
If not specified, then a default is chosen based on the scalar values in
pylist.
ragged_rank
An integer specifying the ragged rank of the returned
RaggedTensorValue. Must be nonnegative and less than K. Defaults to
max(0, K - 1) if inner_shape is not specified. Defaults to `max(0, K
1 - len(inner_shape))ifinner_shapeis specified.
</td>
</tr><tr>
<td>inner_shape</td>
<td>
A tuple of integers specifying the shape for individual inner
values in the returnedRaggedTensorValue. Defaults to()ifragged_rankis not specified. Ifragged_rankis specified, then a
default is chosen based on the contents ofpylist.
</td>
</tr><tr>
<td>row_splits_dtype</td>
<td>
data type for the constructedRaggedTensorValue's
row_splits. One ofnumpy.int32ornumpy.int64`.
Returns
A tf.RaggedTensorValue or numpy.array with rank K and the specified
ragged_rank, containing the values from pylist.
Raises
ValueError
If the scalar values in pylist have inconsistent nesting
depth; or if ragged_rank or inner_shape are incompatible with pylist.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-02-18 UTC."],[],[]]