Updated March 23, 2023
Overview of TensorFlow Versions
Since this is the most used and researched library of machine learning, and currently it’s the hot topic in the research market, there are always new updates. New identifications are taking place in the TensorFlow library when it’s required. The current version of TensorFlow is 2.0. Many of the packages are getting depreciated, or new packages are getting added as the use case for them keeps changing depending on the requirement in the field of data science. So, it isn’t easy to keep track of the versions of TensorFlow.
Different TensorFlow Versions
The TensorFlow library’s versioning is done semantically for all APIs that are available publicly. A release of TensorFlow has the Major, Minor, Patch form.
Current TensorFlow version is 2.0.0
- Major: Version 2
- Minor: Version 0
- Patch Version 0
Changes to each number have the below meaning:
1. Major: This release version denotes all the existing functionalities that are made incompatible in the current release. Still, a few things can be used, such as graphs and checkpoints, which can be migrated.
2. Minor: The release version shows what all of the existing features are not updated and are still the same.
3. Patch: This release version denotes what are all the backward compatibility functionalities are fixed. As part of the version upgrade, things are covered for backward compatibility.
The TensorFlow library’s public APIs are eligible for backward compatibility across all the versions including minor and patch. The different public API consists of:
- All the python functions and their classes are included for the backward compatibility. Except for private symbols or functions or classes whose name begins with _(underscore)
- There is a compatibility API for python tf.compat. We can find out about the utilities or additional help for the user to transition from old version to new version of TensorFlow. These API symbols are depreciated and not supported, and the TensorFlow community will not add any new features for those version transition API.
As part of the version upgrade the things which are not covered for backward compatibility.
- Experimental APIs: all the experimental APIs are not included for backward compatibility as these are purely based on experimental purposes. Particularly the below are not covered for backward compatibility.
- Any symbol present in the tf.contrib module, including its submodules.
- Any symbol containing experimental as a keyword is also ignored.
- Any module whose method or a class contains experimental keyword are also exempted.
- Other languages API such as C++, Java, Go, JavaScript all are exempted.
- Composite operations are also not included.
- Floating-point numbers.
- Random numbers.
- Skewness in distributed TensorFlow
- Bugs
- Error Behavior
Now let’s discuss the version compatibility of saved models, graphs and checkpoints. Model saving is an efficient way of building and reusing the ML models in different programs; this is a kind of serialization of objects functionality provided by the TensorFlow community.
Saved models consist of two parts:
- Encoded graphs which are also called GraphDefs (there can be 1 or more encode graphs)
- CheckPoint
1. Version Compatibility for GraphDefs or Encoded Graphs
- 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.
Let’s see how the versioning of the GraphDefs works:
- Currently, TensorFlow 1.2 is supporting GraphDefs versions from 4 to 7.
- TensorFlow 1.3 has added GraphDefs version 8, and it is supporting versions 4 to 8.
- But in TensorFlow 2.0.0 support is dropped for versions 4 to 7, and only supporting version 8.
- Since the major release has happened, that’s why the support has been dropped.
- TensorFlow provides different tools for converting the old graphs to the new version when the support is dropped.
2. Checkpoint Compatibility
The checkpoint compatibility is divided into two as below:
- Backward Compatibility
- Partial Forward Compatibility
1. Backward Compatibility: This functionality is considered when we need to implement the graphs which are developed and include graphs developed in the older version.
2. Forward Compatibility: Considers a scenario where the developer or we can say the creator of a graph or a checkpoint is upgraded to a newer version of TensorFlow before the consumer uses it. That time this forward compatibility is used.
Conclusion
In this article, we have seen how the versioning happens in TensorFlow and the different packages included as part of the upgrade and which are all the ones excluded. How the old code is made compatible with the new upgraded versions, and how the compatibility works in TensorFlow and what TensorFlow does to implement support for handling the code between different versions.
Recommended Articles
This has been a guide to TensorFlow Versions. Here we discuss the overview and different versions of the TensorFlow Version simply and descriptively. You may also have a look at the following articles to learn more –