
Posted by the TensorFlow and Keras Teams
by enabling int16x8 ops for exp, mirror_pad, space_to_batch_nd, batch_to_space_nd
- enabled int16 for less, greater_than, equal, bitcast, bitwise_xor, right_shift, top_k, mul, and int16 indices for gather and gather_nd
- enabled int8 for floor_div and floor_mod, bitwise_xor, bitwise_xor
- enabled 32-bit int for bitcast, bitwise_xor, right_shift
tf.data
We have improved usability and added functionality for tf.data APIs.
tf.data.Dataset.zip now supports Python-style zipping. Previously users were required to provide an extra set of parentheses when zipping datasets as in Dataset.zip((a, b, c)). With this change, users can specify the datasets to be zipped simply as Dataset.zip(a, b, c) making it more intuitive.
We have also added a new tf.data.experimental.pad_to_cardinality transformation which pads a dataset with zero elements up to a specified cardinality. This is useful for avoiding partial batches while not dropping any data.
Example usage:
ds = tf.data.Dataset.from_tensor_slices({'a': [1, 2]})
ds = ds.apply(tf.data.experimental.pad_to_cardinality(3))
list(ds.as_numpy_iterator())
[{'a': 1, 'valid': True}, {'a': 2, 'valid': True}, {'a': 0, 'valid': False}]This can be useful, e.g. during eval, when partial batches are undesirable but it is also important not to drop any data.
oneDNN BF16 Math Mode on CPU
oneDNN supports , is now the default for all files with the .keras extension.
You can start using it now by calling model.save(“your_model.keras”).
It provides richer Python-side model saving and reloading with numerous advantages:
- A lightweight, faster format:
![]() |
- Human-readable: The new format is name-based, with a more detailed serialization format that makes debugging much easier. What you load is exactly what you saved, from Python’s perspective.
- Safer: Unlike SavedModel, there is no reliance on loading via bytecode or pickling – a big advancement for secure ML, as pickle files can be exploited to cause arbitrary code execution at loading time.
- More general: Support for non-numerical states, such as vocabularies and lookup tables, is included in the new format.
- Extensible: You can add support for saving and loading exotic state elements in custom layers using save_assets(), such as a FIFOQueue – or anything else you want. You have full control of disk I/O for custom assets.
The legacy formats (h5 and Keras SavedModel) will stay supported in perpetuity. However, we recommend that you consider adopting the new Keras v3 format for saving/reloading in Python runtimes, and using model.export() for inference in all other runtimes (such as TF Serving).

SOCIAL SHARE CARD GENERATOR