Parsing
Understand the process of parsing serialized protocol buffers with TensorFlow's parsing functions. Learn to convert serialized data into feature dictionaries, handle fixed and variable-length features, and control output selection. This lesson helps you implement robust parsing functions as part of scalable data pipelines for machine learning models.
We'll cover the following...
We'll cover the following...
Chapter Goals:
- Learn how to parse a serialized protocol buffer
- Understand how feature data is represented in TensorFlow
- Implement a function that parses a serialized protocol buffer
A. Feature parsing
After creating an Example spec, it can be used to parse serialized protocol buffers that are read from a TFRecords file. Specifically, we use the Example spec as an argument to the tf.io.parse_single_example function, which converts a serialized protocol buffer into a usable feature dictionary.
You’ll notice that the output of tf.io.parse_single_example ...