What’s new in TensorFlow 1.4?
TensorFlow 1.4 is here! The latest update to one of the most popular open source machine learning projects boasts big changes, new features, and even a couple of bug fixes.
“When we open-sourced TensorFlow we were hoping to build a machine learning platform for everyone in the world,” said Jeff Dean at the first annual TensorFlow Developer Summit. They’ve done well in achieving that goal: TensorFlow is undeniably the most popular ML project on GitHub with over 77K stars.
Let’s take a look at some of these new features!
One of the biggest changes in 1.4 has got to be the addition of the extremely popular ML framework Keras. Keras has graduated to a part of the core package
tf.keras. The high-level APIs are meant to minimize the time between your ideas and working implementation. It also integrates smoothly with other TensorFlow APIs, including the Estimator API. Since Keras is now a part of the TensorFlow core, it can be relied upon for production workflows.
To get started with Keras:
Here’s another API that’s managed to make the jump to the core package:
tf.data. The Dataset API has graduated to version 1.4 with extra support for Python generators.
In the future, the TensorFlow team now strongly recommends using the Dataset API for creating input pipelines for TensorFlow models. Why? It provides much more functionality than older pipelines like
feed_dict or the queue-based pipeline. It’s also got better all-around performance, as well as being much cleaner and easier to use.
Additionally, the TensorFlow team has made it clear that they’re focusing on Dataset API for future development, rather than bringing other older APIs up to speed.
Here’s more information about you need to know about Datasets:
- Quick introduction to TensorFlow Estimators and Datasets
- Importing Data chapter from the TensorFlow Programmers guide
- Presentation and speakers notes on the Dataset API
Bug fixes, breaking changes, and known issues
It’s not an update without at least one issue. Let’s count ourselves lucky that these are minimal. We’ve got a few of the bigger ones here, but you should head over to the release notes for a full accounting of all the changes.
- Default build options now include Google Cloud Storage file system, Amazon S3 file system, and Hadoop file system.
- Custom op libraries must link against
tf.nn.rnn_cell.DropoutWrapperis now more careful about dropping out LSTM states. Specifically, it no longer ever drops the c (memory) state of an
LSTMStateTuple. The new behavior leads to proper dropout behavior for LSTMs and stacked LSTMs. This bug fix follows recommendations from published literature, but is a behavioral change. State dropout behavior may be customized via the new
- The signature of the
tf.contrib.data.rejection_resample()function has been changed. It now returns a function that can be used as an argument to
- Remove seldom used and unnecessary
Datset.from_generator()does not support Unicode strings in Python 3. You need to convert any strings to bytes objects before yielding them from the generator.