Release 2.10.0
Breaking Changes
- Causal attention in
keras.layers.Attention
and keras.layers.AdditiveAttention
is now specified in the call()
method via the use_causal_mask
argument (rather than in the constructor), for consistency with other layers.
- Some files in
tensorflow/python/training
have been moved to tensorflow/python/tracking
and tensorflow/python/checkpoint
. Please update your imports accordingly, the old files will be removed in Release 2.11.
-
tf.keras.optimizers.experimental.Optimizer
will graduate in Release 2.11, which means tf.keras.optimizers.Optimizer
will be an alias of tf.keras.optimizers.experimental.Optimizer
. The current tf.keras.optimizers.Optimizer
will continue to be supported as tf.keras.optimizers.legacy.Optimizer
, e.g.,tf.keras.optimizers.legacy.Adam
. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer to tf.keras.optimizers.legacy.Optimizer
.
- RNG behavior change for
tf.keras.initializers
. Keras initializers will now use stateless random ops to generate random numbers.
- Both seeded and unseeded initializers will always generate the same values every time they are called (for a given variable shape). For unseeded initializers (
seed=None
), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).
- An unseeded initializer will raise a warning if it is reused (called) multiple times. This is because it would produce the same values each time, which may not be intended.
Major Features and Improvements
Bug Fixes and Other Changes
New argument experimental_device_ordinal
in LogicalDeviceConfiguration
to control the order of logical devices. (GPU only)
tf.keras
:
- Changed the TensorBoard tag names produced by the
tf.keras.callbacks.TensorBoard
callback, so that summaries logged automatically for model weights now include either a /histogram
or /image
suffix in their tag names, in order to prevent tag name collisions across summary types.
When running on GPU (with cuDNN version 7.6.3 or later),tf.nn.depthwise_conv2d
backprop to filter
(and therefore also tf.keras.layers.DepthwiseConv2D
) now operate deterministically (and tf.errors.UnimplementedError
is no longer thrown) when op-determinism has been enabled via tf.config.experimental.enable_op_determinism
. This closes issue 47174.
tf.random
- Added
tf.random.experimental.stateless_shuffle
, a stateless version of tf.random.shuffle
.
Deprecations
- The C++
tensorflow::Code
and tensorflow::Status
will become aliases of respectively absl::StatusCode
and absl::Status
in some future release.
- Use
tensorflow::OkStatus()
instead of tensorflow::Status::OK()
.
- Stop constructing
Status
objects from tensorflow::error::Code
.
- One MUST NOT access
tensorflow::errors::Code
fields. Accessing tensorflow::error::Code
fields is fine.
- Use the constructors such as
tensorflow::errors:InvalidArgument
to create status using an error code without accessing it.
- Use the free functions such as
tensorflow::errors::IsInvalidArgument
if needed.
- In the last resort, use e.g.
static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT)
or static_cast<int>(code)
for comparisons.
-
tensorflow::StatusOr
will also become in the future alias to absl::StatusOr
, so use StatusOr::value
instead of StatusOr::ConsumeValueOrDie
.
Thanks to our Contributors
This release contains contributions from many people at Google, as well as:
Abolfazl Shahbazi, Adam Lanicek, Amin Benarieb, andreii, Andrew Fitzgibbon, Andrew Goodbody, angerson, Ashiq Imran, Aurรฉlien Geron, Banikumar Maiti (Intel Aipg), Ben Barsdell, Ben Mares, bhack, Bhavani Subramanian, Bill Schnurr, Byungsoo Oh, Chandra Sr Potula, Chengji Yao, Chris Carpita, Christopher Bate, chunduriv, Cliff Woolley, Cliffs Dover, Cloud Han, Code-Review-Doctor, DEKHTIARJonathan, Deven Desai, Djacon, Duncan Riach, fedotoff, fo40225, Frederic Bastien, gadagashwini, Gauri1 Deshpande, guozhong.zhuang, Hui Peng, James Gerity, Jason Furmanek, Jonathan Dekhtiar, Jueon Park, Kaixi Hou, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, kushanam, Learning-To-Play, Li-Wen Chang, lipracer, liuyuanqiang, Louis Sugy, Lucas David, Lukas Geiger, Mahmoud Abuzaina, Marius Brehler, Maxiwell S. Garcia, mdfaijul, Meenakshi Venkataraman, Michal Szutenberg, Michele Di Giorgio, Mickaรซl Salamin, Nathan John Sircombe, Nathan Luehr, Neil Girdhar, Nils Reichardt, Nishidha Panpaliya, Nobuo Tsukamoto, Om Thakkar, Patrice Vignola, Philipp Hack, Pooya Jannaty, Prianka Liz Kariat, pshiko, Rajeshwar Reddy T, rdl4199, Rohit Santhanam, Rsanthanam-Amd, Sachin Muradi, Saoirse Stewart, Serge Panev, Shu Wang, Srinivasan Narayanamoorthy, Stella Stamenova, Stephan Hartmann, Sunita Nadampalli, synandi, Tamas Bela Feher, Tao Xu, Thibaut Goetghebuer-Planchon, Trevor Morris, Xiaoming (Jason) Cui, Yimei Sun, Yong Tang, Yuanqiang Liu, Yulv-Git, Zhoulong Jiang, ZihengJiang