Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bump
Created with
brew bump-formula-pr
.release notes
Build, Compilation and Packaging
tensorflow-gpu
andtf-nightly-gpu
. These packages were removed and replaced with packages that direct users to switch totensorflow
ortf-nightly
respectively. Since TensorFlow 2.1, the only difference between these two sets of packages was their names, so there is no loss of functionality or GPU support. See https://pypi.org/project/tensorflow-gpu for more details.tf.function
:tf.function
now uses the Python inspect library directly for parsing the signature of the Python function it is decorated on. This change may break code where the function signature is malformed, but was ignored previously, such as:functools.wraps
on a function with different signaturefunctools.partial
with an invalidtf.function
inputtf.function
now enforces input parameter names to be valid Python identifiers. Incompatible names are automatically sanitized similarly to existing SavedModel signature behavior.tf.function
s are assumed to have an emptyinput_signature
instead of an undefined one even if theinput_signature
is unspecified.tf.types.experimental.TraceType
now requires an additionalplaceholder_value
method to be defined.tf.function
now traces with placeholder values generated by TraceType instead of the value itself.Experimental APIs
tf.config.experimental.enable_mlir_graph_optimization
andtf.config.experimental.disable_mlir_graph_optimization
were removed.Major Features and Improvements
Support for Python 3.11 has been added.
Support for Python 3.7 has been removed. We are not releasing any more patches for Python 3.7.
tf.lite
:fill
.tf.experimental.dtensor
:dtensor.initialize_accelerator_system
, and enabled by default.tf.experimental.dtensor.is_dtensor
to check if a tensor is a DTensor instance.tf.data
:experimental_symbolic_checkpoint
option oftf.data.Options()
.rerandomize_each_iteration
argument for thetf.data.Dataset.random()
operation, which controls whether the sequence of generated random numbers should be re-randomized every epoch or not (the default behavior). Ifseed
is set andrerandomize_each_iteration=True
, therandom()
operation will produce a different (deterministic) sequence of numbers every epoch.rerandomize_each_iteration
argument for thetf.data.Dataset.sample_from_datasets()
operation, which controls whether the sequence of generated random numbers used for sampling should be re-randomized every epoch or not. Ifseed
is set andrerandomize_each_iteration=True
, thesample_from_datasets()
operation will use a different (deterministic) sequence of numbers every epoch.tf.test
:tf.test.experimental.sync_devices
, which is useful for accurately measuring performance in benchmarks.tf.experimental.dtensor
:Bug Fixes and Other Changes
tf.SavedModel
:tf.saved_model.experimental.Fingerprint
that contains the fingerprint of the SavedModel. See the SavedModel Fingerprinting RFC for details.tf.saved_model.experimental.read_fingerprint(export_dir)
for reading the fingerprint of a SavedModel.tf.random
tf.random.split
andtf.random.fold_in
, the experimental endpoints are still available so no code changes are necessary.tf.experimental.ExtensionType
experimental.extension_type.as_dict()
, which converts an instance oftf.experimental.ExtensionType
to adict
representation.stream_executor
stream_executor
directory has been deleted, users should use equivalent headers and targets undercompiler/xla/stream_executor
.tf.nn
tf.nn.experimental.general_dropout
, which is similar totf.random.experimental.stateless_dropout
but accepts a custom sampler function.tf.types.experimental.GenericFunction
experimental_get_compiler_ir
method supports tf.TensorSpec compilation arguments.tf.config.experimental.mlir_bridge_rollout
MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED
andMLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED
which are no longer used by the tf2xla bridgeKeras
Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
Breaking Changes
tf.keras
:keras.saving
, for example:keras.saving.load_model
,keras.saving.save_model
,keras.saving.custom_object_scope
,keras.saving.get_custom_objects
,keras.saving.register_keras_serializable
,keras.saving.get_registered_name
andkeras.saving.get_registered_object
. The previous API locations (inkeras.utils
andkeras.models
) will be available indefinitely, but we recommend you update your code to point to the new API locations.tf.RaggedTensor
or using keras masking, the returned loss values should be the identical to each other. In previous versions Keras may have silently ignored the mask.2.12
compared to previous versions.Major Features and Improvements
tf.keras
:.keras
) is available. You can start using it viamodel.save(f"{fname}.keras", save_format="keras_v3")
. In the future it will become the default for all files with the.keras
extension. This file format targets the Python runtime only and makes it possible to reload Python objects identical to the saved originals. The format supports non-numerical state such as vocabulary files and lookup tables, and it is easy to customize in the case of custom layers with exotic elements of state (e.g. a FIFOQueue). The format does not rely on bytecode or pickling, and is safe by default. Note that as a result, Pythonlambdas
are disallowed at loading time. If you want to uselambdas
, you can passsafe_mode=False
to the loading method (only do this if you trust the source of the model).model.export(filepath)
API to create a lightweight SavedModel artifact that can be used for inference (e.g. with TF-Serving).keras.export.ExportArchive
class for low-level customization of the process of exporting SavedModel artifacts for inference. Both ways of exporting models are based ontf.function
tracing and produce a TF program composed of TF ops. They are meant primarily for environments where the TF runtime is available, but not the Python interpreter, as is typical for production with TF Serving.tf.keras.utils.FeatureSpace
, a one-stop shop for structured data preprocessing and encoding.tf.SparseTensor
input support totf.keras.layers.Embedding
layer. The layer now accepts a new boolean argumentsparse
. Ifsparse
is set to True, the layer returns a SparseTensor instead of a dense Tensor. Defaults to False.jit_compile
as a settable property totf.keras.Model
.synchronized
optional parameter tolayers.BatchNormalization
.layers.experimental.SyncBatchNormalization
and suggested to uselayers.BatchNormalization
withsynchronized=True
instead.tf.keras.layers.BatchNormalization
to support masking of the inputs (mask
argument) when computing the mean and variance.tf.keras.layers.Identity
, a placeholder pass-through layer.show_trainable
option totf.keras.utils.model_to_dot
to display layer trainable status in model plots.tf.keras.utils.FeatureSpace
object, viafeature_space.save("myfeaturespace.keras")
, and reload it viafeature_space = tf.keras.models.load_model("myfeaturespace.keras")
.tf.keras.utils.to_ordinal
to convert class vector to ordinal regression / classification matrix.Bug Fixes and Other Changes
Security
tf.raw_ops.Print
CVE-2023-25660Thanks to our Contributors
This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, Vinila S, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09