จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: StringToHashBucket
#include <string_ops.h>
แปลงแต่ละสตริงในอินพุต เทนเซอร์ เป็นแฮชม็อดด้วยที่เก็บข้อมูลจำนวนหนึ่ง
สรุป
ฟังก์ชันแฮชจะกำหนดเนื้อหาของสตริงภายในกระบวนการ
โปรดทราบว่าฟังก์ชันแฮชอาจมีการเปลี่ยนแปลงเป็นครั้งคราว ฟังก์ชันนี้จะเลิกใช้งานแล้ว และขอแนะนำให้ใช้ tf.string_to_hash_bucket_fast()
หรือ tf.string_to_hash_bucket_strong()
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- num_buckets: จำนวนที่เก็บข้อมูล
ผลตอบแทน:
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 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](/versions/r2.2/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\nArguments:\n\n- scope: A [Scope](/versions/r2.2/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](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A [Tensor](/versions/r2.2/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](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/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](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_to_hash_bucket_1aa9bf9eee8fb7b9e5590cf5591057b40a) | `::`[tensorflow::Output](/versions/r2.2/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```"]]