tfma.types.VarLenTensorValue
Stay organized with collections
Save and categorize content based on your preferences.
VarLenTensorValue encapsulates a batch of varlen dense tensor values.
tfma.types.VarLenTensorValue(
values: np.ndarray, indices: np.ndarray, dense_shape: np.ndarray
)
Attributes |
values
|
A np.ndarray of values.
|
indices
|
A np.ndarray of indices.
|
dense_shape
|
A np.ndarray representing the dense shape of the entire tensor.
Note that each row (i.e. set of values sharing the same value for the
first / batch dimension) is considered to have its own shape based on the
presence of values.
|
Child Classes
class DenseRowIterator
Methods
dense_rows
View source
dense_rows()
from_dense_rows
View source
@classmethod
from_dense_rows(
dense_rows: Iterable[np.ndarray]
) -> 'VarLenTensorValue'
Converts a collection of variable length dense arrays into a tensor.
Args |
dense_rows
|
A sequence of possibly variable length 1D arrays.
|
Returns |
A new VarLenTensorValue containing the sparse representation of the
vertically stacked dense rows. The dense_shape attribute on the result
will be (num_rows, max_row_len).
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["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 2024-04-26 UTC."],[],[]]