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 will perform two separate models on the MNIST image recognition dataset. The first is a straightforward fully connected neural network, while the second replicates our CNN network from Chapter 8, Section 2, "Implementing a Simple CNN".

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.