tf.data.experimental.parse_example_dataset | TensorFlow v2.16.1 (original) (raw)
A transformation that parses Example
protos into a dict
of tensors. (deprecated)
View aliases
Compat aliases for migration
SeeMigration guide for more details.
tf.compat.v1.data.experimental.parse_example_dataset
tf.data.experimental.parse_example_dataset(
features, num_parallel_calls=1, deterministic=None
)
Parses a number of serialized Example
protos given in serialized
. We refer to serialized
as a batch with batch_size
many entries of individualExample
protos.
This op parses serialized examples into a dictionary mapping keys to Tensor
,SparseTensor
, and RaggedTensor
objects. features
is a dict from keys toVarLenFeature
, RaggedFeature
, SparseFeature
, and FixedLenFeature
objects. Each VarLenFeature
and SparseFeature
is mapped to aSparseTensor
; each RaggedFeature
is mapped to a RaggedTensor
; and eachFixedLenFeature
is mapped to a Tensor
. See tf.io.parse_example for more details about feature dictionaries.
Args | |
---|---|
features | A dict mapping feature keys to FixedLenFeature,VarLenFeature, RaggedFeature, and SparseFeature values. |
num_parallel_calls | (Optional.) A tf.int32 scalar tf.Tensor, representing the number of parsing processes to call in parallel. |
deterministic | (Optional.) A boolean controlling whether determinism should be traded for performance by allowing elements to be produced out of order if some parsing calls complete faster than others. Ifdeterministic is None, thetf.data.Options.deterministic dataset option (True by default) is used to decide whether to produce elements deterministically. |
Returns |
---|
A dataset transformation function, which can be passed totf.data.Dataset.apply. |
Raises | |
---|---|
ValueError | if features argument is None. |