TensorFlow 2.5.0

New features and improvements

1. Added support for Python3.9.

2. tf.data

  • The Tf.Data service now supports strict round robin reading, which is useful for sample sizes of synchronous training workloads. With strict round robin reading, users can ensure that consumers get similar-sized examples in the same step.

  • The Tf.data service now supports optional compression. Previously, data is compressed, but now can pass to tf. Data. Experimental. Service. Distribute (…). Pass Compression =None to disable compression.

  • Tf.data.dataset. Batch () now supports num_PARALLEL_calls and Deterministic parameters. Num_parallel_calls is used to indicate that multiple input batches should be evaluated in parallel. With num_PARALLEL_calls set, the deterministic parameter is used to indicate that outputs can be obtained in nondeterministic order.

  • Options returned by tf.data.dataset. Options () are no longer mutable.

  • The tF.data input pipeline can now be executed in debug mode, which disables any asynchronous, parallel, or nondeterministic, and forces Python execution (rather than tracing compiled computed graph execution) to pass in user-defined functions in transformations such as Maps. Debug mode can be achieved by tf. Data. The experimental. Enable_debug_mode ().

3. tf.lite

The new MLIR-based quantization back end is enabled by default.

  • New backend for 8 int post-training quantization.

  • The new back end removes redundant rescaling factors and fixes some bugs (shared weights/bias, minimal scaling factors, etc.).

  • Set experimental_new_quantizer in tF.lite.tfliteconverter to False to disable this change.

4. tf.keras

  • Tf.keras.metrics.AUC now supports Logit forecasting.

  • New supported input types have been enabled in Model.fit. Tf. Keras. Utils. Experimental. DatasetCreator, dataset_fn this type need to the function. DatasetCreator applies to all TF.Distribute policies and is the only input type supported by the parameter server policy.

5. tf.distribute

  • Now available in tf. Distribute. Within the scope of the Strategy (tf) distribute). Experimental CentralStorageStrategy and Tf. Distribute. Experimental. Except ParameterServerStrategy) create tf. Random. The Generator. Different copies will get different random number workflow.

  • Tf. Distribute. Experimental. ParameterServerStrategy now and DatasetCreator when used together, can pass Keras Model. The fit for training.

6. TPU embedding support

Profile_data_directory has been added to the EmbeddingConfigSpec in _tpu_ESTIMator_contex. py. This feature allows embedding lookup statistics collected at run time to be used for embedding layer partitioning decisions.

7. PluggableDevice

Third-party devices can now connect to TensorFlow in a modular manner through the StreamExecutor C API and PluggableDevice interface.

  • Add custom operators and kernels through the kernel and operator registration C API.

  • Register custom computational graph optimization channels using the computational graph optimization C API.

  • StreamExecutor C API

    Github.com/tensorflow/…

  • PluggableDevice

    Github.com/tensorflow/…

  • Modularized

    Github.com/tensorflow/…

  • Kernel and operator registration C API

    Github.com/tensorflow/…

  • Computational graph optimization C API

    Github.com/tensorflow/…

8. Intel optimized TensorFlow’s oneAPI Deep Neural Network Library (oneDNN) CPU performance optimization is now available in official x86-64 Linux and Windows versions.

  • Intel-optimized TensorFlow

    Software.intel.com/content/www…

  • OneAPI Deep Neural Network Library (oneDNN)

    Github.com/oneapi-src/…

  • By default, these performance tuning features are turned off. These functions can be enabled by setting the environment variable TF_ENABLE_ONEDNN_OPTS=1.

  • It is not recommended to use these features on GPU systems because they have not been fully tested on the GPU.

9. Build TensorFlow PIP software package using CUDA11.2 and cuDNN 8.1.0.

Significant changes

The TF_CPP_MIN_VLOG_LEVEL environment variable has been renamed to TF_CPP_MAX_VLOG_LEVEL to correctly describe its impact.