# Fingerprint

public final class **Fingerprint** Generates fingerprint values.


Generates fingerprint values of \`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.

<br />

<br />

<br />

<br />

<br />

<br />

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<[UInt8](https://www.tensorflow.org/api_docs/java/org/tensorflow/types/UInt8)\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Fingerprint#asOutput())() Returns the symbolic handle of a tensor. |
| static \<T\> [Fingerprint](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Fingerprint) | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Fingerprint#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<T>,%20org.tensorflow.Operand<java.lang.String>))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> data, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> method) Factory method to create a class wrapping a new Fingerprint operation. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<[UInt8](https://www.tensorflow.org/api_docs/java/org/tensorflow/types/UInt8)\> | [fingerprint](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Fingerprint#fingerprint())() A two-dimensional \`Tensor\` of type [`tf.uint8`](https://www.tensorflow.org/api_docs/python/tf#uint8). |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface [org.tensorflow.Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)

|---|---|
| abstract [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<[UInt8](https://www.tensorflow.org/api_docs/java/org/tensorflow/types/UInt8)\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand#asOutput())() Returns the symbolic handle of a tensor. |

## Public Methods

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<[UInt8](https://www.tensorflow.org/api_docs/java/org/tensorflow/types/UInt8)\>
**asOutput**
()

Returns the symbolic handle of a tensor.

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.

<br />

#### public static [Fingerprint](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Fingerprint)
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> data, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> method)

Factory method to create a class wrapping a new Fingerprint operation.

##### Parameters

| scope | current scope |
| data | Must have rank 1 or higher. |
| method | Fingerprint method used by this op. Currently available method is \`farmhash::fingerprint64\`. |
|---|---|

##### Returns

- a new instance of Fingerprint

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<[UInt8](https://www.tensorflow.org/api_docs/java/org/tensorflow/types/UInt8)\>
**fingerprint**
()

A two-dimensional \`Tensor\` of type [`tf.uint8`](https://www.tensorflow.org/api_docs/python/tf#uint8). The first dimension equals to
\`data\`'s first dimension, and the second dimension size depends on the
fingerprint algorithm.