Example Spec

Create an Example spec used for parsing serialized Examples.

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 ...