# SparseCrossV2

public final class **SparseCrossV2** Generates sparse cross from a list of sparse and dense tensors.


The op takes two lists, one of 2D \`SparseTensor\` and one of 2D \`Tensor\`, each
representing features of one feature column. It outputs a 2D \`SparseTensor\` with
the batchwise crosses of these features.


For example, if the inputs are


inputs\[0\]: SparseTensor with shape = \[2, 2\]
\[0, 0\]: "a"
\[1, 0\]: "b"
\[1, 1\]: "c"


inputs\[1\]: SparseTensor with shape = \[2, 1\]
\[0, 0\]: "d"
\[1, 0\]: "e"


inputs\[2\]: Tensor \[\["f"\], \["g"\]\]


then the output will be


shape = \[2, 2\]
\[0, 0\]: "a_X_d_X_f"
\[1, 0\]: "b_X_e_X_g"
\[1, 1\]: "c_X_e_X_g"


if hashed_output=true then the output will be


shape = \[2, 2\]
\[0, 0\]: FingerprintCat64(
Fingerprint64("f"), FingerprintCat64(
Fingerprint64("d"), Fingerprint64("a")))
\[1, 0\]: FingerprintCat64(
Fingerprint64("g"), FingerprintCat64(
Fingerprint64("e"), Fingerprint64("b")))
\[1, 1\]: FingerprintCat64(
Fingerprint64("g"), FingerprintCat64(
Fingerprint64("e"), Fingerprint64("c")))

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

### Public Methods

|---|---|
| static [SparseCrossV2](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/SparseCrossV2) | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/SparseCrossV2#create(org.tensorflow.op.Scope,%20java.lang.Iterable<org.tensorflow.Operand<java.lang.Long>>,%20java.lang.Iterable<org.tensorflow.Operand<?>>,%20java.lang.Iterable<org.tensorflow.Operand<java.lang.Long>>,%20java.lang.Iterable<org.tensorflow.Operand<?>>,%20org.tensorflow.Operand<java.lang.String>))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Long\>\> indices, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\>\> values, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Long\>\> shapes, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\>\> denseInputs, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> sep) Factory method to create a class wrapping a new SparseCrossV2 operation. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Long\> | [outputIndices](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/SparseCrossV2#outputIndices())() 2-D. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Long\> | [outputShape](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/SparseCrossV2#outputShape())() 1-D. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<String\> | [outputValues](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/SparseCrossV2#outputValues())() 1-D. |

### 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() |

## Public Methods

#### public static [SparseCrossV2](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/SparseCrossV2)
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Long\>\> indices, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\>\> values, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Long\>\> shapes, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\>\> denseInputs, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> sep)

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

##### Parameters

| scope | current scope |
| indices | 2-D. Indices of each input \`SparseTensor\`. |
| values | 1-D. values of each \`SparseTensor\`. |
| shapes | 1-D. Shapes of each \`SparseTensor\`. |
| denseInputs | 2-D. Columns represented by dense \`Tensor\`. |
| sep | string used when joining a list of string inputs, can be used as separator later. |
|---|---|

##### Returns

- a new instance of SparseCrossV2

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

2-D. Indices of the concatenated \`SparseTensor\`.

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

1-D. Shape of the concatenated \`SparseTensor\`.

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

1-D. Non-empty values of the concatenated or hashed
\`SparseTensor\`.