Using TensorFlow with Keras

TensorFlow is great for the flexibility and power it provides to the programmer. A drawback of this is that prototyping models, and iterating through various tests can be cumbersome for the programmer. Keras is a wrapper for deep learning libraries that makes it simpler to deal with various aspects of the model and make the programming easier.  Here, we choose to use Keras on top of TensorFlow.  In fact, using Keras with the TensorFlow backend is so popular, that there is a Keras library within TensorFlow. For this recipe, we will be using that TensorFlow library to do a fully connected neural network and a simple CNN image network on the MNIST dataset.

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.