ParseExample

public final class ParseExample

Transforms a vector of tf.Example protos (as strings) into typed tensors.

Constants

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

Public Methods

static ParseExample
create(Scope scope, Operand<TString> serialized, Operand<TString> names, Operand<TString> sparseKeys, Operand<TString> denseKeys, Operand<TString> raggedKeys, Iterable<Operand<?>> denseDefaults, Long numSparse, List<Class<? extends TType>> sparseTypes, List<Class<? extends TType>> raggedValueTypes, List<Class<? extends TNumber>> raggedSplitTypes, List<Shape> denseShapes)
Factory method to create a class wrapping a new ParseExample operation.
List<Output<?>>
List<Output<?>>
List<Output<?>>
List<Output<TInt64>>
List<Output<TInt64>>
List<Output<?>>

Inherited Methods

Constants

public static final String OP_NAME

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

Constant Value: "ParseExampleV2"

Public Methods

public static ParseExample create (Scope scope, Operand<TString> serialized, Operand<TString> names, Operand<TString> sparseKeys, Operand<TString> denseKeys, Operand<TString> raggedKeys, Iterable<Operand<?>> denseDefaults, Long numSparse, List<Class<? extends TType>> sparseTypes, List<Class<? extends TType>> raggedValueTypes, List<Class<? extends TNumber>> raggedSplitTypes, List<Shape> denseShapes)

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

Parameters
scope current scope
serialized A scalar or vector containing binary serialized Example protos.
names A tensor containing the names of the serialized protos. Corresponds 1:1 with the `serialized` tensor. May contain, for example, table key (descriptive) names for the corresponding serialized protos. These are purely useful for debugging purposes, and the presence of values here has no effect on the output. May also be an empty vector if no names are available. If non-empty, this tensor must have the same shape as "serialized".
sparseKeys Vector of strings. The keys expected in the Examples' features associated with sparse values.
denseKeys Vector of strings. The keys expected in the Examples' features associated with dense values.
raggedKeys Vector of strings. The keys expected in the Examples' features associated with ragged values.
denseDefaults A list of Tensors (some may be empty). Corresponds 1:1 with `dense_keys`. dense_defaults[j] provides default values when the example's feature_map lacks dense_key[j]. If an empty Tensor is provided for dense_defaults[j], then the Feature dense_keys[j] is required. The input type is inferred from dense_defaults[j], even when it's empty. If dense_defaults[j] is not empty, and dense_shapes[j] is fully defined, then the shape of dense_defaults[j] must match that of dense_shapes[j]. If dense_shapes[j] has an undefined major dimension (variable strides dense feature), dense_defaults[j] must contain a single element: the padding element.
numSparse The number of sparse keys.
sparseTypes A list of `num_sparse` types; the data types of data in each Feature given in sparse_keys. Currently the ParseExample supports DT_FLOAT (FloatList), DT_INT64 (Int64List), and DT_STRING (BytesList).
raggedValueTypes A list of `num_ragged` types; the data types of data in each Feature given in ragged_keys (where `num_ragged = sparse_keys.size()`). Currently the ParseExample supports DT_FLOAT (FloatList), DT_INT64 (Int64List), and DT_STRING (BytesList).
raggedSplitTypes A list of `num_ragged` types; the data types of row_splits in each Feature given in ragged_keys (where `num_ragged = sparse_keys.size()`). May be DT_INT32 or DT_INT64.
denseShapes A list of `num_dense` shapes; the shapes of data in each Feature given in dense_keys (where `num_dense = dense_keys.size()`). The number of elements in the Feature corresponding to dense_key[j] must always equal dense_shapes[j].NumEntries(). If dense_shapes[j] == (D0, D1, ..., DN) then the shape of output Tensor dense_values[j] will be (|serialized|, D0, D1, ..., DN): The dense outputs are just the inputs row-stacked by batch. This works for dense_shapes[j] = (-1, D1, ..., DN). In this case the shape of the output Tensor dense_values[j] will be (|serialized|, M, D1, .., DN), where M is the maximum number of blocks of elements of length D1 * .... * DN, across all minibatch entries in the input. Any minibatch entry with less than M blocks of elements of length D1 * ... * DN will be padded with the corresponding default_value scalar element along the second dimension.
Returns
  • a new instance of ParseExample

public List<Output<?>> denseValues ()

public List<Output<?>> raggedRowSplits ()

public List<Output<?>> raggedValues ()

public List<Output<TInt64>> sparseIndices ()

public List<Output<TInt64>> sparseShapes ()

public List<Output<?>> sparseValues ()