Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Is the graphdef version of tensorflow compatible with tensorflow?


Asked by Callahan Nicholson on Dec 13, 2021 FAQ



If a given version of TensorFlow supports the GraphDef version of a graph, it will load and evaluate with the same behavior as the TensorFlow version used to generate it (except for floating point numerical details and random numbers as outlined above), regardless of the major version of TensorFlow.
In respect to this,
Every version release for the TensorFlow supports an interval for the GraphDef versions. This interval is constant across the patch releases. And it’s only modified when there is a major release happens. The support for Graphdef only happens when there is a major release.
Also Know, GraphDef is the proto defined here. This is the serialized version of graph. You can print, store, or restore a GraphDef in any TensorFlow frontend (Python, R, C++, Java, ...). When it is stored to a file, usually the file name ends with .pb, so you should use GraphDef for .pb files.
Besides,
In particular, a GraphDef which is compatible with a checkpoint file in one version of TensorFlow (such as is the case in a SavedModel) will remain compatible with that checkpoint in subsequent versions, as long as the GraphDef is supported.
Furthermore,
As you may know, tensorflow support many front-end programming languages, like Python, C++, Java and Go and the core language is C++; how do the other languages transform the Graphto C++? They use a tool called protobufwhich can generate specific language stubs, that's where the GraphDefcome from. It's a serialized version of Graph.