Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
tensoreflusso:: ops:: StringToHashBucket
#include <string_ops.h>
Converte ogni stringa nel tensore di input nel relativo mod hash mediante un numero di bucket.
Riepilogo
La funzione hash è deterministica sul contenuto della stringa all'interno del processo.
Tieni presente che la funzione hash può cambiare di volta in volta. Questa funzionalità sarà deprecata e si consiglia di utilizzare tf.string_to_hash_bucket_fast()
o tf.string_to_hash_bucket_strong()
.
Argomenti:
- scope: un oggetto Scope
- num_buckets: il numero di bucket.
Resi:
-
Output
: un tensore della stessa forma dell'input string_tensor
.
Attributi pubblici
Funzioni pubbliche
nodo
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatore::tensorflow::Output
operator::tensorflow::Output() const
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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```"]]