View source on GitHub
|
Parses a single Example proto.
tf.compat.v1.parse_single_example(
serialized, features, name=None, example_names=None
)
Similar to parse_example, except:
For dense tensors, the returned Tensor is identical to the output of
parse_example, except there is no batch dimension, the output shape is the
same as the shape given in dense_shape.
For SparseTensors, the first (batch) column of the indices matrix is removed
(the indices matrix is a column vector), the values vector is unchanged, and
the first (batch_size) entry of the shape vector is removed (it is now a
single element vector).
One might see performance advantages by batching Example protos with
parse_example instead of using this function directly.
serialized
features
FixedLenFeature or
VarLenFeature values.
name
example_names
dict mapping feature keys to Tensor and SparseTensor values.
ValueError
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.