W3cubDocs

/TensorFlow C++

tensorflow::ops::ParseExample

#include <parsing_ops.h>

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

Summary

Arguments:

  • scope: A Scope object
  • serialized: A vector containing a batch of binary serialized Example protos.
  • names: A vector containing the names of the serialized protos. 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 vector must be the same length as "serialized".
  • sparse_keys: A list of Nsparse string Tensors (scalars). The keys expected in the Examples' features associated with sparse values.
  • dense_keys: A list of Ndense string Tensors (scalars). The keys expected in the Examples' features associated with dense values.
  • dense_defaults: A list of Ndense Tensors (some may be empty). 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, its shape must match dense_shapes[j].
  • sparse_types: A list of Nsparse 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).
  • dense_shapes: A list of Ndense shapes; the shapes of data in each Feature given in 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 (|serialized|, D0, D1, ..., DN): The dense outputs are just the inputs row-stacked by batch.

Returns:

  • OutputList sparse_indices
  • OutputList sparse_values
  • OutputList sparse_shapes
  • OutputList dense_values
Constructors and Destructors
ParseExample(const ::tensorflow::Scope & scope, ::tensorflow::Input serialized, ::tensorflow::Input names, ::tensorflow::InputList sparse_keys, ::tensorflow::InputList dense_keys, ::tensorflow::InputList dense_defaults, const DataTypeSlice & sparse_types, const gtl::ArraySlice< TensorShape > & dense_shapes)
Public attributes
dense_values
sparse_indices
sparse_shapes
sparse_values

Public attributes

dense_values

::tensorflow::OutputList dense_values

sparse_indices

::tensorflow::OutputList sparse_indices

sparse_shapes

::tensorflow::OutputList sparse_shapes

sparse_values

::tensorflow::OutputList sparse_values

Public functions

ParseExample

 ParseExample(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input serialized,
  ::tensorflow::Input names,
  ::tensorflow::InputList sparse_keys,
  ::tensorflow::InputList dense_keys,
  ::tensorflow::InputList dense_defaults,
  const DataTypeSlice & sparse_types,
  const gtl::ArraySlice< TensorShape > & dense_shapes
)

© 2017 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-example.html