@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class StringToHashBucketStrong extends Pointer
key
defines the key of the hash function. key
is an array of 2 elements.
A strong hash is important when inputs may be malicious, e.g. URLs with
additional components. Adversaries could try to make their inputs hash to the
same bucket for a denial-of-service attack or to skew the results. A strong
hash can be used to make it difficult to find inputs with a skewed hash value
distribution over buckets. This requires that the hash function is
seeded by a high-entropy (random) "key" unknown to the adversary.
The additional robustness comes at a cost of roughly 4x higher compute
time than tf.string_to_hash_bucket_fast
.
Arguments:
* scope: A Scope object
* input: The strings to assign a hash bucket.
* num_buckets: The number of buckets.
* key: The key used to seed the hash function, passed as a list of two uint64
elements.
Returns:
* Output
: A Tensor of the same shape as the input string_tensor
.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
StringToHashBucketStrong(Pointer p)
Pointer cast constructor.
|
StringToHashBucketStrong(Scope scope,
Input input,
long num_buckets,
int... key) |
StringToHashBucketStrong(Scope scope,
Input input,
long num_buckets,
IntBuffer key) |
StringToHashBucketStrong(Scope scope,
Input input,
long num_buckets,
IntPointer key) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
StringToHashBucketStrong |
operation(Operation setter) |
Output |
output() |
StringToHashBucketStrong |
output(Output setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public StringToHashBucketStrong(Pointer p)
Pointer(Pointer)
.public StringToHashBucketStrong(@Const @ByRef Scope scope, @ByVal Input input, @Cast(value="tensorflow::int64") long num_buckets, @tensorflow.ArraySlice IntPointer key)
public StringToHashBucketStrong(@Const @ByRef Scope scope, @ByVal Input input, @Cast(value="tensorflow::int64") long num_buckets, @tensorflow.ArraySlice IntBuffer key)
public Node node()
public StringToHashBucketStrong operation(Operation setter)
public StringToHashBucketStrong output(Output setter)
Copyright © 2022. All rights reserved.