Migrating to TensorFlow v2.19.0
Version v2.19.0 introduces 2 breaking changes. This guide details how to update your code.
Released: 3/12/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
tflite::Interpreter:kTensorsReservedCapacitytflite::Interpreter:kTensorsCapacityHeadroomtf.lite.Interpreterai_edge_litert.interpreter.Interpretertfl.CastlibtensorflowBreaking Changes
●Issue #1
In the C++ LiteRT API, the public constants `tflite::Interpreter:kTensorsReservedCapacity` and `tflite::Interpreter:kTensorsCapacityHeadroom` have been changed from `constexpr` compile‑time constants to const references, breaking code that expects compile‑time values.
●Issue #2
The Python class `tf.lite.Interpreter` now emits a deprecation warning and will be removed in TensorFlow 2.20; it has been moved to `ai_edge_litert.interpreter.Interpreter`.
Migration Steps
- 1Replace imports of `tf.lite.Interpreter` with `from ai_edge_litert.interpreter import Interpreter`.
- 2If your C++ code relied on the constexpr values of `tflite::Interpreter:kTensorsReservedCapacity` or `kTensorsCapacityHeadroom`, update it to handle these symbols as const references rather than compile‑time constants.
Release Summary
TensorFlow 2.19 introduces breaking changes to LiteRT constants and deprecates `tf.lite.Interpreter`, adds bfloat16 support to `tfl.Cast`, and stops publishing `libtensorflow` packages.
Need More Details?
View the full release notes and all changes for TensorFlow v2.19.0.
View Full Changelog