tft.hash_strings
Stay organized with collections
Save and categorize content based on your preferences.
Hash strings into buckets.
tft.hash_strings(
strings: common_types.ConsistentTensorType,
hash_buckets: int,
key: Optional[Iterable[int]] = None,
name: Optional[str] = None
) -> common_types.ConsistentTensorType
Args |
strings
|
a Tensor , SparseTensor , or RaggedTensor of dtype tf.string .
|
hash_buckets
|
the number of hash buckets.
|
key
|
optional. An array of two Python uint64 . If passed, output will be a
deterministic function of strings and key . Note that hashing will be
slower if this value is specified.
|
name
|
(Optional) A name for this operation.
|
Returns |
A Tensor , SparseTensor , or RaggedTensor of dtype tf.int64 with the
same shape as
the input strings .
|
Raises |
TypeError
|
if strings is not a Tensor , SparseTensor , or RaggedTensor
of dtype tf.string .
|
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-11-01 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-11-01 UTC."],[],[]]