A first release candidate of the soon to be finalised TensorFlow 2.1 is now available, giving those who can’t wait a chance to test the improved Cloud TPU support or take the new text vectorisation layer for a spin.
The latter is part of the Keras module, which is where most changes in this release can be found. TextVectorization is meant to help with text classification issues, by offering text standardisation, tokenisation, generation of n-grams, and vocabulary indexing for raw strings.
Earlier this year, the team behind deep learning library Keras decided to step away from their project to concentrate on the apparently better maintained TensorFlow module. Additions such as the skip_mismatch argument for model.load_weights hint to that, having been available in the external version before.
Since TensorFlow is mainly driven by Google, the upcoming version will see a lot of improvements for users working with the company’s cloud tensor processing units (TPUs). The release candidate for example supports combining Keras’ .compile, .fit, .evaluate, and .predict with Cloud TPU Pods. It also comes with automatic outside compilation for Cloud TPUs enabled and includes options for dynamic batch sizes and mixed precision on those units.
To improve performance on Linux and Windows systems alike, the tensorflow pip package now comes with out of the box GPU support. Users fretting the slightly bigger package size that goes along with that are however free to download a CPU-only version. Changes in rebatching for tf.data datasets and the accompanying distribution strategies are also meant to let machine learning systems achieve a speedup.
A couple of APIs have matured out of their experimental state and been renamed to reflect that. Users of tf.config.experimentalVirtualDeviceConfiguration will for example have to start calling tf.config.LogicalDeviceConfiguration instead. tf.config.experimental_list_devices meanwhile has been removed and is replaced by tf.config.list_logical_devices.
A complete list of changes can be found in the release notes, which also hints at temporary performance degradations for Windows users.
Developers who still use TensorFlow in combination with Python 2 should be aware that TF 2.1 will be the last release to work with that version of the programming language. This is in part down to official support for Python 2 ceasing on 1 January, 2020.