TensorFlow release 1.4 is now public - and this is a big one! So we're happy to announce a number of new and exciting features we hope everyone will enjoy.
Keras
In 1.4, Keras has graduated from tf.contrib.keras
to core package tf.keras
. Keras is a hugely popular machine learning framework, consisting of high-level APIs to minimize the time between your ideas and working implementations. Keras integrates smoothly with other core TensorFlow functionality, including the Estimator API. In fact, you may construct an Estimator directly from any Keras model by calling the tf.keras.estimator.model_to_estimator
function. With Keras now in TensorFlow core, you can rely on it for your production workflows.
To get started with Keras, please read:
- Short introduction.
- The guide to the Keras Sequential model API.
- The guide to the Keras Functional model API.
To get started with Estimators, please read:
- The Introduction to TensorFlow Estimators and Datasets blog post.
Datasets
We're pleased to announce that the Dataset API has graduated to core package tf.data
(from tf.contrib.data
). The 1.4 version of the Dataset API also adds support for Python generators. We strongly recommend using the Dataset API to create input pipelines for TensorFlow models because:
- The Dataset API provides more functionality than the older APIs (
feed_dict
or the queue-based pipelines). - The Dataset API performs better.
- The Dataset API is cleaner and easier to use.
We're going to focus future development on the Dataset API rather than the older APIs.
To get started with Datasets, please read:
- The Introduction to TensorFlow Estimators and Datasets blog post.
- The Importing Data chapter of the TensorFlow Programmers guide.
- The following slidedeck (with speaker notes) that introduces the Dataset API.
Distributed Training & Evaluation for Estimators
Release 1.4 also introduces the utility function tf.estimator.train_and_evaluate
, which simplifies training, evaluation, and exporting Estimator models. This function enables distributed execution for training and evaluation, while still supporting local execution.
Other Enhancements
Beyond the features called out in this announcement, 1.4 also introduces a number of additional enhancements, which are described in the Release Notes.
Installing TensorFlow 1.4
TensorFlow release 1.4 is now available using standard pip
installation.
# Note: the following command will overwrite any existing TensorFlow
# installation.
$ pip install --ignore-installed --upgrade tensorflow
# Use pip for Python 2.7
# Use pip3 instead of pip for Python 3.x
We've updated the documentation on tensorflow.org to 1.4.
TensorFlow depends on contributors for enhancements. A big thank you to everyonehelping out developing TensorFlow! Don't hesitate to join the community and become a contributor by developing the source code on GitHub or helping out answering questions on Stack Overflow.
We hope you enjoy all the features in this release.
Happy TensorFlow Coding!