Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::StringToHashBucket
#include <string_ops.h>
Converts each string in the input Tensor to its hash mod by a number of buckets.
Summary
The hash function is deterministic on the content of the string within the process.
Note that the hash function may change from time to time. This functionality will be deprecated and it's recommended to use tf.string_to_hash_bucket_fast()
or tf.string_to_hash_bucket_strong()
.
Args:
- scope: A Scope object
- num_buckets: The number of buckets.
Returns:
Output
: A Tensor of the same shape as the input string_tensor
.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
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. Some content is licensed under the numpy license.
Last updated 2021-11-15 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 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::StringToHashBucket Class Reference\n\ntensorflow::ops::StringToHashBucket\n===================================\n\n`#include \u003cstring_ops.h\u003e`\n\nConverts each string in the input [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) to its hash mod by a number of buckets.\n\nSummary\n-------\n\nThe hash function is deterministic on the content of the string within the process.\n\nNote that the hash function may change from time to time. This functionality will be deprecated and it's recommended to use `tf.string_to_hash_bucket_fast()` or `tf.string_to_hash_bucket_strong()`.\n\nArgs:\n\n- scope: A [Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- num_buckets: The number of buckets.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of the same shape as the input `string_tensor`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [StringToHashBucket](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1a45ffa748a3113aebc478191777156e23)`(const ::`[tensorflow::Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` string_tensor, int64 num_buckets)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1a8e8161468ccb2b34fb9d2ee060e04dae) | [Operation](/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1aa9bf9eee8fb7b9e5590cf5591057b40a) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1ad01f6ca8a9542ce9a2d082c3e8aa3deb)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1a796c5fc80d4ca7bc537f783ec6c40c51)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1a9ae43cc82a78a8e8958dcc0fdf944aab)`() const ` | |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### StringToHashBucket\n\n```gdscript\n StringToHashBucket(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input string_tensor,\n int64 num_buckets\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]