We're going to see TensorFlow in action and see how we can perform digit classification with a tractable amount of code. TensorFlow is Google's machine learning library, for numerical analysis in general. It is called TensorFlow because it supposedly flows tensors, where tensors are defined to be arrays of n dimensions. Tensors have a real geometric meaning that just multidimensional arrays don't necessarily classify, but we're just going to use that term. A tensor is just a multidimensional array.
Here, we're going to do a simple softmax example. It's a very simple model; you can visit TensorFlow's own website (https://www.tensorflow.org/get_started/mnist/beginners) for more information. Let's have a look at the following code:
data_dir = '/tmp/tensorflow/mnist/input_data'
mnist...