tfds.decode.DeserializeMethod
Stay organized with collections
Save and categorize content based on your preferences.
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.Example might 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.
Class Variables |
|
DESERIALIZE_AND_DECODE
|
<DeserializeMethod.DESERIALIZE_AND_DECODE: 'deserialize_and_decode'>
|
|
DESERIALIZE_NO_DECODE
|
<DeserializeMethod.DESERIALIZE_NO_DECODE: 'deserialize_no_decode'>
|
|
RAW_BYTES
|
<DeserializeMethod.RAW_BYTES: 'raw_bytes'>
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-31 UTC."],[],[]]