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.
SEE ALSO: Building a custom machine learning model on Android with Tensorflow Lite
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 KerasWe 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.
Keras 2.3.0
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:
SEE ALSO: Top programming languages in 2019: Python sweeps the board
API changes
These API changes bring the release in sync with the tf.keras API.
- Add
size(x)
to backend API add_metric
method added to Layer / Model- Class-based losses added:
MeanSquaredError
MeanAbsoluteError
MeanAbsolutePercentageError
MeanSquaredLogarithmicError
BinaryCrossentropy
CategoricalCrossentropy
SparseCategoricalCrossentropy
Hinge
SquaredHinge
CategoricalHinge
Poisson
LogCosh
KLDivergence
Huber
- Renamed
lr
tolearning_rate
- All Layer subclasses: Layers set as attributes of a Layer are now tracked.
- Class-based metrics introduced. Metrics can now be stateful.
Accuracy
MeanSquaredError
Hinge
CategoricalHinge
SquaredHinge
FalsePositives
TruePositives
FalseNegatives
TrueNegatives
BinaryAccuracy
CategoricalAccuracy
TopKCategoricalAccuracy
LogCoshError
Poisson
KLDivergence
CosineSimilarity
MeanAbsoluteError
MeanAbsolutePercentageError
MeanSquaredError
MeanSquaredLogarithmicError
RootMeanSquaredError
BinaryCrossentropy
CategoricalCrossentropy
Precision
Recall
AUC
SparseCategoricalAccuracy
SparseTopKCategoricalAccuracy
SparseCategoricalCrossentropy
- Deprecated argument
decay
for all optimizers.
Breaking changes
A few breaking changes come with this release.
- TensorBoard callback: When used with TensorFlow 2.0,
batch_size
argument,write_grads
,embeddings_freq
,embeddings_layer_names
,embeddings_metadata
, andembeddings_data
are 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
sigmoid
in RNN layers.
The post Keras 2.3.0 is the last major release of multi-backend Keras appeared first on JAXenter.
Source : JAXenter