TensorFlow and Keras
TensorFlow was developed at Google to use internally for machine learning tasks, and applied to the applications like speech recognition, Search, Gmail, etc. It was made public in 2015 as an open source application. The library is in C++, used with Python API. TensorFlow can be used for various problems like image recognition, language processing, implementation in self-driving cars, etc. There are various alternatives available to TensorFlow such as Theano, and Torch.
We are going to use Keras in this notebook, with Tensorflow as a backend engine. Keras is a high-level wrapper, which can be used both with TensorFlow and Theano. It simplifies common operations. The code is similar to scikit-learn, making it easier to get used to it, while in the background TensorFlow or Theano is used for processing.
In this example we will be looking at MNIST database (a subset of a larger set by National Institute of Standards and Technology). This is a classic dataset containing 60000 training images, 10000 test images, and corresponding training and test labels. The images are handwritten digits, in the shape of 28 x 28 pixels, and divided into 10 categories (from 0 to 9).
In this example I am using Keras v.2.1.4 and TensorFlow v.1.5.0 with GPU (using NVIDIA CUDA). Running examples on a GPU can speed up the training process.