Search code examples
pythontensorflowtensorflow2.0tfrecord

Can code from TF 1.x read a tfrecords file written using TF 2.x?


Can a tfrecords file(s) written using one version of TF be read by code written using a different version of TF? In particular can tfrecords files written using TF 2 be read by code written using TF1? Or is the serialization format TF version specific?


Solution

  • The tfrecords files use the protobuf format, which is used by both TF1 and TF2. So yes, you can read tfrecord files from both versions of tensorflow.