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.
Getting ready
For this recipe, we will use the Keras functions that reside inside TensorFlow already. Keras (https://keras.io/) is already a separate python library which you can install. If you choose to go for the pure Keras route, you will have to choose a backend for Keras (like TensorFlow).
In this recipe we...