Handwritten digits using TFoS

In this section, we'll look at how to convert our TensorFlow code to run on TFoS. To do this, first, we need to build an EC2 cluster on Amazon AWS. One of the easy ways to do this is to use Flintrock, a CLI tool for launching Apache Spark clusters from your local machine.

The following are the prerequisites that you'll need to complete this section:

  • Hadoop
  • PySpark
  • Flintrock
  • Python
  • TensorFlow
  • TensorFlowOnSpark

Now, let's see how we can do this. We're using the MNIST dataset (http://yann.lecun.com/exdb/mnist/). The following code is taken from the TensorFlowOnSpark GitHub. The repository contains the links to documentation and more examples (https://github.com/yahoo/TensorFlowOnSpark):

  1. Define the model architecture ...

Get TensorFlow Machine Learning Projects 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.