@Operator(group="strings") public final class ToHashBucketFast extends PrimitiveOp implements Operand<Long>
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`.
operation
Modifier and Type | Method and Description |
---|---|
Output<Long> |
asOutput()
Returns the symbolic handle of a tensor.
|
static ToHashBucketFast |
create(Scope scope,
Operand<String> input,
Long numBuckets)
Factory method to create a class wrapping a new ToHashBucketFast operation.
|
Output<Long> |
output()
A Tensor of the same shape as the input `string_tensor`.
|
equals, hashCode, op, toString
public static ToHashBucketFast create(Scope scope, Operand<String> input, Long numBuckets)
scope
- current scopeinput
- The strings to assign a hash bucket.numBuckets
- The number of buckets.public Output<Long> asOutput()
Operand
Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput
in interface Operand<Long>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.