#include <parsing_ops.h>
Transforms a tf.Example proto (as a string) into typed tensors.
Arguments:
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.sparse_keys
and sparse_types
.num_sparse
strings. The keys expected in the Examples' features associated with sparse values.num_sparse
types; the data types of data in each Feature given in sparse_keys. Currently the ParseSingleExample op supports DT_FLOAT (FloatList), DT_INT64 (Int64List), and DT_STRING (BytesList).dense_keys
. 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 (D0, D1, ..., DN): In the case dense_shapes[j] = (-1, D1, ..., DN), the shape of the output Tensor dense_values[j] will be (M, D1, .., DN), where M is the number of blocks of elements of length D1 * .... * DN, in the input.Returns:
OutputList
sparse_indicesOutputList
sparse_valuesOutputList
sparse_shapesOutputList
dense_values Constructors and Destructors | |
---|---|
ParseSingleExample(const ::tensorflow::Scope & scope, ::tensorflow::Input serialized, ::tensorflow::InputList dense_defaults, int64 num_sparse, const gtl::ArraySlice< string > & sparse_keys, const gtl::ArraySlice< string > & dense_keys, const DataTypeSlice & sparse_types, const gtl::ArraySlice< PartialTensorShape > & dense_shapes) |
Public attributes | |
---|---|
dense_values | |
sparse_indices | |
sparse_shapes | |
sparse_values |
::tensorflow::OutputList dense_values
::tensorflow::OutputList sparse_indices
::tensorflow::OutputList sparse_shapes
::tensorflow::OutputList sparse_values
ParseSingleExample( const ::tensorflow::Scope & scope, ::tensorflow::Input serialized, ::tensorflow::InputList dense_defaults, int64 num_sparse, const gtl::ArraySlice< string > & sparse_keys, const gtl::ArraySlice< string > & dense_keys, const DataTypeSlice & sparse_types, const gtl::ArraySlice< PartialTensorShape > & dense_shapes )
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/parse-single-example.html