First deep learning example

As mentioned in the last post, we will run all our DL exercises on GPU. It requires us to set up a separate virtual environment where our Python programs will be run on GPU instead of CPU. Also, we will use Keras library together with Python scientific suite (i.e., Numpy, SciPy, matplotlib). This post has the correct and most up-to-date info on how to set everything up from scratch. I followed it step by step with no problem.  

In addition, I decided to use Jupyter Notebook to try out all the examples in Deep Learning with Python (DLP). Therefore, we need to install nb_conda_kernels so that we can run all the code in Jupyter Notebook under the GPU environment we just set up. 

Now after getting the setup out of the way, we can start our first DL example: the MNIST project. This is in Ch 2 of DLP. Basically, we ask the computer to read grayscale images of handwritten digits (0 through 9) and correctly classify them. Below is a chart illustrating how the algorithm works for this example. But it also reflects how DL works in general. 

Flowchart of a Deep Learning Algorithm

For actual Python code and output, please see Ch 2 MNIST example in my GitHub repository.