TensorFlow
Data & MLAn Open Source Machine Learning Framework for Everyone
Release History
v2.21.0Breaking1 fix8 featuresRelease 2.21.0 removes support for Python 3.9 and the TensorBoard dependency, while introducing significant quantization and data type support enhancements in tf.lite and JPEG XL support in tf.image.
v2.21.0-rc1Breaking1 fix8 featuresRelease 2.21.0 removes support for Python 3.9 and introduces significant quantization and data type support enhancements in tf.lite, alongside JPEG XL support in tf.image.
v2.21.0-rc0Breaking1 fix8 featuresRelease 2.21.0 removes support for Python 3.9 and introduces significant quantization and data type support enhancements in tf.lite, alongside JPEG XL support in tf.image.
v2.20.0Breaking1 featureTensorFlow 2.20.0 makes `tensorflow-io-gcs-filesystem` optional, adds `autotune.min_parallelism` to `tf.data.Options`, and deprecates `tf.lite` in favor of LiteRT.
v2.19.11 fix1 featureThis patch fixes the save_model.save function for serving embeddings and introduces SparseCore Reshard support.
v2.20.0-rc0Breaking1 featureTensorFlow 2.20.0 makes `tensorflow-io-gcs-filesystem` optional and deprecates `tf.lite` while adding `autotune.min_parallelism` to `tf.data.Options` for faster pipeline warm‑up.
v2.19.0Breaking1 fix1 featureTensorFlow 2.19 introduces breaking changes to LiteRT constants and deprecates `tf.lite.Interpreter`, adds bfloat16 support to `tfl.Cast`, and stops publishing `libtensorflow` packages.
v2.18.1Breaking1 fixThis patch updates curl for security, loosens the ml_dtypes version bound, and deprecates tf.lite.Interpreter in favor of ai_edge_litert.interpreter, while dropping TPU support until 2.19.0.
v2.19.0-rc0Breaking1 fix1 featureTensorFlow 2.19.0 adds bfloat16 support for the tfl.Cast op, deprecates tf.lite.Interpreter in favor of ai_edge_litert.interpreter, and changes two interpreter constants to const references, requiring code updates.
Common Errors
InvalidArgumentError7 reportsInvalidArgumentError in TensorFlow typically arises when an argument passed to a TensorFlow operation has an unexpected or invalid value, such as out-of-bounds indices, incorrect data types, or shapes incompatible with the operation's requirements. To fix it, thoroughly inspect the shapes, data types, and value ranges of all input tensors passed to the failing operation, ensuring they conform to the operation's expected input requirements; use `tf.debugging.assert_*` ops for runtime validation. Verify that reduction axes are valid for `argmin/argmax` and that `buffer_size` and `vocab_size` are reasonable to prevent OOM issues when shuffling or creating index tables.
ResourceExhaustedError4 reportsResourceExhaustedError in TensorFlow usually means your operation tried to allocate more memory (typically GPU) than available. Reduce the batch size, image/sequence dimensions, model size, or number of parallel threads/processes to decrease memory usage. Consider using tf.data API for efficient memory management and data streaming; also, check for memory leaks or inefficient tensor operations.
TypeError2 reportsTypeError in TensorFlow often arises when XLA compilation (jit_compile=True) encounters non-TensorFlow Python types (like Python booleans directly passed to tf.cond or when using >2 branches in tf.cond). To fix this, ensure that the conditional predicate is a TensorFlow boolean tensor (e.g., using tf.constant(True, dtype=tf.bool)) and convert intermediate values to Tensors when using multiple branches in `tf.cond`. For example, cast Python booleans to tf.constant and use tf.identity to enforce the same output type across different `tf.cond` branches.
Related Data & ML Packages
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
Tensors and Dynamic neural networks in Python with strong GPU acceleration
scikit-learn: machine learning in Python
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
Streamlit — A faster way to build and share data apps.
Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
Subscribe to Updates
Get notified when new versions are released