Keras 2.3.0 is the last major release of multi-backend Keras
Keras version 2.3.0 is here, and it is the last major multi-backend release. Going forward, users are recommended to switch their code over to tf.keras in TensorFlow 2.0. This release brings API changes and a few breaking changes. Have a look under the hood and see what it includes, as well as what the plans are going forward.
Keras, the deep learning library written in Python, has a new release. Version 2.3.0 is now the first release that supports TensorFlow 2.0. This version adds a few breaking changes and API changes and maintains TensorFlow 1.14 and 1.13 compatibility.
For those new to the API, a quick introduction: Keras is a deep learning that’s user friendly and uses models as a way to organize layers. It allows for fast prototyping and supports convolutional networks and recurrent networks. It was created by François Chollet, author of Deep Learning with Python.
Let’s have a look under the hood and see what the new version includes, as well as the latest news and plans going forward.
Last major multi-backend release
Take note: this is the last major release of multi-backend Keras. This means that afterward, users are recommended to switch their code to tf.keras in TensorFlow 2.0. From now on, development will focus on tf.keras.
Maintainance for multi-backend Keras will continue for six months. However no new API changes will be ported and only bug fixes will be merged.
New release of multi-backend Keras: 2.3.0https://t.co/2JYTf2hjVD
– First release of multi-backend Keras with full TF 2 support
– Continued support for Theano/CNTK
– Will be the last major release of multi-backend Keras
We recommend you switch your Keras code to tf.keras.
— François Chollet (@fchollet) September 17, 2019
tf.keras is TensorFlow’s API for building and training deep learning modules. For more information on getting started, importing it into your TensorFlow program, and how to start building models, refer to the informative guide.
According to the GitHub changelog, the benefits of using tf.keras are numerous.
It implements the same Keras 2.3.0 API (so switching should be as easy as changing the Keras import statements), but it has many advantages for TensorFlow users, such as support for eager execution, distribution, TPU training, and generally far better integration between low-level TensorFlow and high-level concepts like Layer and Model. It is also better maintained.
Version 2.3.0 adds a long list of API changes. From the changelog, here are some of the highlights arriving with the latest release:
These API changes bring the release in sync with the tf.keras API.
size(x)to backend API
add_metricmethod added to Layer / Model
- Class-based losses added:
- All Layer subclasses: Layers set as attributes of a Layer are now tracked.
- Class-based metrics introduced. Metrics can now be stateful.
- Deprecated argument
decayfor all optimizers.
A few breaking changes come with this release.
- TensorBoard callback: When used with TensorFlow 2.0,
embeddings_dataare all deprecated/ignored.
- Loss aggregation mechanism changed to sum over batch size
- Metrics and losses now reported under the same name, set by the user.
- Default recurrent activation changed to
sigmoidin RNN layers.