SerializeManySparse

public final class SerializeManySparse

Serialize an `N`-minibatch `SparseTensor` into an `[N, 3]` `Tensor` object.

The `SparseTensor` must have rank `R` greater than 1, and the first dimension is treated as the minibatch dimension. Elements of the `SparseTensor` must be sorted in increasing order of this first dimension. The serialized `SparseTensor` objects going into each row of `serialized_sparse` will have rank `R-1`.

The minibatch size `N` is extracted from `sparse_shape[0]`.

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output<U>
asOutput()
Returns the symbolic handle of the tensor.
static <U extends TType> SerializeManySparse<U>
create(Scope scope, Operand<TInt64> sparseIndices, Operand<? extends TType> sparseValues, Operand<TInt64> sparseShape, Class<U> outType)
Factory method to create a class wrapping a new SerializeManySparse operation.
static SerializeManySparse<TString>
create(Scope scope, Operand<TInt64> sparseIndices, Operand<? extends TType> sparseValues, Operand<TInt64> sparseShape)
Factory method to create a class wrapping a new SerializeManySparse operation using default output types.
Output<U>

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "SerializeManySparse"

Public Methods

public Output<U> asOutput ()

Returns the symbolic handle of the 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.

public static SerializeManySparse<U> create (Scope scope, Operand<TInt64> sparseIndices, Operand<? extends TType> sparseValues, Operand<TInt64> sparseShape, Class<U> outType)

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

Parameters
scope current scope
sparseIndices 2-D. The `indices` of the minibatch `SparseTensor`.
sparseValues 1-D. The `values` of the minibatch `SparseTensor`.
sparseShape 1-D. The `shape` of the minibatch `SparseTensor`.
outType The `dtype` to use for serialization; the supported types are `string` (default) and `variant`.
Returns
  • a new instance of SerializeManySparse

public static SerializeManySparse<TString> create (Scope scope, Operand<TInt64> sparseIndices, Operand<? extends TType> sparseValues, Operand<TInt64> sparseShape)

Factory method to create a class wrapping a new SerializeManySparse operation using default output types.

Parameters
scope current scope
sparseIndices 2-D. The `indices` of the minibatch `SparseTensor`.
sparseValues 1-D. The `values` of the minibatch `SparseTensor`.
sparseShape 1-D. The `shape` of the minibatch `SparseTensor`.
Returns
  • a new instance of SerializeManySparse

public Output<U> serializedSparse ()