View source on GitHub
|
How to deserialize the bytes that are read before returning.
When reading examples from a source (e.g., a file), we consider 2 phases in parsing the raw data:
Deserialize: deserializes raw bytes into an object. Typically it will be deserialized into a
tf.train.Example.Decode: A
tf.train.Examplemight encode information (e.g., a bytes feature encodes an image or a int64 list encodes a tensor). The second phase decodes the encoded information.
DESERIALIZE_AND_DECODE: deserialize the raw bytes to tf example (if file
format doesn't have a custom encoding) and then decode the features. Note
that how and what is decoded can typically be overriden with decoders.
DESERIALIZE_NO_DECODE: parse the raw bytes to tf example (if file format
doesn't have a custom encoding). If this parse method is used, then all
decoders are ignored.
RAW_BYTES: don't parse nor decode, but return the raw bytes.
View source on GitHub