@Operator(group="sparse") public final class SparseCross extends RawOp
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")))
Modifier and Type | Class and Description |
---|---|
static class |
SparseCross.Inputs |
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME
The name of this op, as known by TensorFlow core engine
|
Constructor and Description |
---|
SparseCross(Operation operation) |
Modifier and Type | Method and Description |
---|---|
static SparseCross |
create(Scope scope,
Iterable<Operand<TInt64>> indices,
Iterable<Operand<?>> values,
Iterable<Operand<TInt64>> shapes,
Iterable<Operand<?>> denseInputs,
Operand<TString> sep)
Factory method to create a class wrapping a new SparseCrossV2 operation.
|
Output<TInt64> |
outputIndices()
Gets outputIndices.
|
Output<TInt64> |
outputShape()
Gets outputShape.
|
Output<TString> |
outputValues()
Gets outputValues.
|
public static final String OP_NAME
public SparseCross(Operation operation)
@Endpoint(describeByClass=true) public static SparseCross create(Scope scope, Iterable<Operand<TInt64>> indices, Iterable<Operand<?>> values, Iterable<Operand<TInt64>> shapes, Iterable<Operand<?>> denseInputs, Operand<TString> sep)
scope
- current scopeindices
- 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.public Output<TInt64> outputIndices()
SparseTensor
.public Output<TString> outputValues()
SparseTensor
.Copyright © 2015–2022. All rights reserved.