TensorFlow Example
Let us consider a TensorFlow/Keras example of using a Convolutional Neural Network to carry out image classification for the MNIST dataset. (This is one of a few different examples described earlier in this topic.) The example — developed by Francois Chollet, the creator of Keras — builds a convolutional network (or "convnet") and is described on the example page for Simple MNIST convnet. The source code itself on Github is linked on that page, can be found on Github, and is reproduced in full in the code box below.
Please download the source code file linked at Github above and save it to your local computer. You might then want to transfer the file to one or more machines at TACC in order to run the code there.
In short, the code below uses the Keras API to TensorFlow in order to load the MNIST dataset, construct a Keras Sequential neural network that includes two hidden layers composed of two-dimensional convolutional elements (Conv2D), and then train and test the model on the MNIST training and testing sets.
We will return in subsequent pages to demonstrate how to install the relevant TensorFlow/Keras packages and run this sample code on the Frontera system at TACC.