How it works...
We begin by importing TensorFlow and enabling eager execution (Step 1). Ordinarily, in TensorFlow, operations are not performed immediately. Rather, a computation graph is built, and, at the very end, all operations are run together. In eager execution, computations are executed as soon as possible. Next, in Step 2, we import the Fashion MNIST dataset. This dataset has become a de facto replacement for MNIST, offering several improvements over it (such as added challenges). We then subdivide the dataset 50:50 between Alice and Bob. We then define a function to cast the pixel values of Fashion MNIST from integers to floats to be used in the training of our neural network (Step 3) and another function to flatten the images into ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access