Example Spec
Learn how to build an Example spec in TensorFlow that defines parsing rules for serialized Example objects. This lesson guides you through creating a Python dictionary mapping dataset features to FixedLenFeature objects, specifying the shape and data type for integers, floats, and strings. You will develop an efficient input pipeline foundation for machine learning workflows.
We'll cover the following...
Chapter Goals:
- Create the Example spec that’s used to parse serialized Example objects
A. Creating the Example spec
Since the data is now stored as serialized Example objects in TFRecords files, we need to create an Example spec, which allows us to parse the serialized Examples in the input pipeline. The Example spec gives specifications on each of the dataset’s features, specifically the shape and type of the feature’s values.
The Example spec is just a Python dictionary, mapping feature names to FixedLenFeature objects. For our ...