StringToHashBucketFast
tensorflow C++ API
tensorflow::ops::StringToHashBucketFast
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 and will never change. However, it is not suitable for cryptography. This function may be used when CPU time is scarce and inputs are trusted or unimportant. There is a risk of adversaries constructing inputs that all hash to the same bucket. To prevent this problem, use a strong hash function with tf.string_to_hash_bucket_strong
.
Arguments:
- scope: A Scope object
- input: The strings to assign a hash bucket.
- num_buckets: The number of buckets.
Returns:
StringToHashBucketFast block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_string.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input input: connect Input node.
- num_buckets : Input num_buckets in value.
Return:
- Output output : Output object of StringToHashBucketFast class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.