Keras and the Dataset API graduate in TensorFlow 1.4
The latest release of Google’s popular open-source library TensorFlow graduates the Keras framework and Dataset API.
Keras is a machine learning framework written in Python which aims to minimise the time between ideas and working implementations. It consists of two high-level APIs: Keras Sequential, and Keras Functional.
Sequential models are created using the keras_model_sequential() function and are composed of a set of linear layers. The functional API enables you to define more complex models — such as multi-output models, directed acyclic graphs, or models with shared layers.
Google says Keras “integrates smoothly” with other core TensorFlow functionality; such as the Estimator API. In fact, you’re able to construct an Estimator directly from any Keras model by calling the tf.keras.estimator.model_to_estimator function.
Keras was available in prior versions of TensorFlow as a contribution package (tf.contrib.keras) but this release graduates the framework to a core package (tf.keras).
Another graduation to celebrate in TensorFlow 1.4 is that of the Dataset API which now includes support for Python generators. Google says it “strongly recommends” using this API for creating input pipelines as it provides more functionality than older alternatives while also performing better and being cleaner and easier to use.
Keep in mind, only Python APIs — such as those in the Keras framework and the Dataset API — are covered by TensorFlow’s backwards compatibility promise. You’re on your own if you use C++, Java, or Go APIs.
What are your thoughts on how TensorFlow is developing? Let us know in the comments.