@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class Fingerprint extends Pointer
data
.
Fingerprint op considers the first dimension of data
as the batch dimension,
and output[i]
contains the fingerprint value generated from contents in
data[i, ...]
for all i
.
Fingerprint op writes fingerprint values as byte arrays. For example, the
default method farmhash64
generates a 64-bit fingerprint value at a time.
This 8-byte value is written out as an uint8
array of size 8, in little-endian
order.
For example, suppose that data
has data type DT_INT32
and shape (2, 3, 4),
and that the fingerprint method is farmhash64
. In this case, the output shape
is (2, 8), where 2 is the batch dimension size of data
, and 8 is the size of
each fingerprint value in bytes. output[0, :]
is generated from 12 integers in
data[0, :, :]
and similarly output[1, :]
is generated from other 12 integers
in data[1, :, :]
.
Note that this op fingerprints the raw underlying buffer, and it does not
fingerprint Tensor's metadata such as data type and/or shape. For example, the
fingerprint values are invariant under reshapes and bitcasts as long as the
batch dimension remain the same:
Fingerprint(data) == Fingerprint(Reshape(data, ...))
Fingerprint(data) == Fingerprint(Bitcast(data, ...))
For string data, one should expect Fingerprint(data) !=
Fingerprint(ReduceJoin(data))
in general.
Arguments:
* scope: A Scope object
* data: Must have rank 1 or higher.
* method: Fingerprint method used by this op. Currently available method is
farmhash::fingerprint64
.
Returns:
* Output
: A two-dimensional Tensor
of type tf.uint8
. The first dimension equals to
data
's first dimension, and the second dimension size depends on the
fingerprint algorithm.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Fingerprint(Pointer p)
Pointer cast constructor.
|
Fingerprint(Scope scope,
Input data,
Input method) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Output |
fingerprint() |
Fingerprint |
fingerprint(Output setter) |
Node |
node() |
Operation |
operation() |
Fingerprint |
operation(Operation 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 Fingerprint(Pointer p)
Pointer(Pointer)
.public Node node()
public Fingerprint operation(Operation setter)
public Fingerprint fingerprint(Output setter)
Copyright © 2022. All rights reserved.