ParseSingleSequenceExample
tensorflow C++ API
tensorflow::ops::ParseSingleSequenceExample
Transforms a scalar brain.SequenceExample proto (as strings) into typed tensors.
Summary
Arguments:
- scope: A Scope object
- serialized: A scalar containing a binary serialized SequenceExample proto.
- feature_list_dense_missing_assumed_empty: A vector listing the FeatureList keys which may be missing from the SequenceExample. If the associated FeatureList is missing, it is treated as empty. By default, any FeatureList not listed in this vector must exist in the SequenceExample.
- context_sparse_keys: A list of Ncontext_sparse string Tensors (scalars). The keys expected in the Examples' features associated with context_sparse values.
- context_dense_keys: A list of Ncontext_dense string Tensors (scalars). The keys expected in the SequenceExamples' context features associated with dense values.
- feature_list_sparse_keys: A list of Nfeature_list_sparse string Tensors (scalars). The keys expected in the FeatureLists associated with sparse values.
- feature_list_dense_keys: A list of Nfeature_list_dense string Tensors (scalars). The keys expected in the SequenceExamples' feature_lists associated with lists of dense values.
- context_dense_defaults: A list of Ncontext_dense Tensors (some may be empty). context_dense_defaults[j] provides default values when the SequenceExample's context map lacks context_dense_key[j]. If an empty Tensor is provided for context_dense_defaults[j], then the Feature context_dense_keys[j] is required. The input type is inferred from context_dense_defaults[j], even when it's empty. If context_dense_defaults[j] is not empty, its shape must match context_dense_shapes[j].
- debug_name: A scalar containing the name of the serialized proto. May contain, for example, table key (descriptive) name for the corresponding serialized proto. This is purely useful for debugging purposes, and the presence of values here has no effect on the output. May also be an empty scalar if no name is available.
Optional attributes (seeAttrs
):
- context_sparse_types: A list of Ncontext_sparse types; the data types of data in each context Feature given in context_sparse_keys. Currently the ParseSingleSequenceExample supports DT_FLOAT (FloatList), DT_INT64 (Int64List), and DT_STRING (BytesList).
- context_dense_shapes: A list of Ncontext_dense shapes; the shapes of data in each context Feature given in context_dense_keys. The number of elements in the Feature corresponding to context_dense_key[j] must always equal context_dense_shapes[j].NumEntries(). The shape of context_dense_values[j] will match context_dense_shapes[j].
- feature_list_sparse_types: A list of Nfeature_list_sparse types; the data types of data in each FeatureList given in feature_list_sparse_keys. Currently the ParseSingleSequenceExample supports DT_FLOAT (FloatList), DT_INT64 (Int64List), and DT_STRING (BytesList).
- feature_list_dense_shapes: A list of Nfeature_list_dense shapes; the shapes of data in each FeatureList given in feature_list_dense_keys. The shape of each Feature in the FeatureList corresponding to feature_list_dense_key[j] must always equal feature_list_dense_shapes[j].NumEntries().
Returns:
OutputList
context_sparse_indicesOutputList
context_sparse_valuesOutputList
context_sparse_shapesOutputList
context_dense_valuesOutputList
feature_list_sparse_indicesOutputList
feature_list_sparse_valuesOutputList
feature_list_sparse_shapesOutputList
feature_list_dense_values
ParseSingleSequenceExample block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_parsing_op.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input serialized: connect Input node.
- Input feature_list_dense_missing_assumed_empty: connect Input node.
- InputList context_sparse_keys: connect Input node.
- InputList context_dense_keys: connect Input node.
- InputList feature_list_sparse_keys: connect Input node.
- InputList feature_list_dense_keys: connect Input node.
- InputList context_dense_defaults: connect Input node.
- Input debug_name: connect Input node.
- ParseSingleSequenceExample::Attrs attrs : input Attrs in values ex)context_sparse_types_ = {};feature_list_dense_types_ = {};context_dense_shapes_ = {};feature_list_sparse_types_ = {};feature_list_dense_shapes_ = {};
Return:
- OutputList context_sparse_indices : Output object of ParseSingleSequenceExample class object.
- OutputList context_sparse_values : Output object of ParseSingleSequenceExample class object.
- OutputList context_sparse_shapes : Output object of ParseSingleSequenceExample class object.
- OutputList context_dense_values : Output object of ParseSingleSequenceExample class object.
- OutputList feature_list_sparse_indices : Output object of ParseSingleSequenceExample class object.
- OutputList feature_list_sparse_values : Output object of ParseSingleSequenceExample class object.
- OutputList feature_list_sparse_shapes : Output object of ParseSingleSequenceExample class object.
- OutputList feature_list_dense_values : Output object of ParseSingleSequenceExample class object.
Result:
- std::vector(Tensor) result_context_sparse_indices: Returned object of executed result by calling session.
- std::vector(Tensor) result_context_sparse_values: Returned object of executed result by calling session.
- std::vector(Tensor) result_context_sparse_shapes : Returned object of executed result by calling session.
- std::vector(Tensor) result_context_dense_values: Returned object of executed result by calling session.
- std::vector(Tensor) result_feature_list_sparse_indices: Returned object of executed result by calling session.
- std::vector(Tensor) result_feature_list_sparse_values: Returned object of executed result by calling session.
- std::vector(Tensor) result_feature_list_sparse_shapes: Returned object of executed result by calling session.
- std::vector(Tensor) result_feature_list_dense_values: Returned object of executed result by calling session.