10 Nov, 2016 Blogs
By Indrajit Poddar, Yu Bo Li, Qing Wang, Jun Song Wang, IBM
These days you can see machine and deep learning applications in so many places. Get driven by a driverless car. Check if your email is really conveying your sense of joy with the IBM Watson Tone Analyzer, and see IBM Watson beat the best Jeopardy player in the world in speed and accuracy. Facebook is even using image recognition tools to suggest tagging people in your photos; it knows who they are!
Barking Up the Right Tree with the IBM S822LC for HPC
We wanted to see what it would take to get started building our very own deep learning application and host it in a cloud. We used the open source deep learning framework, Caffe, and example classification Jupyter notebooks from GitHub, like classifying with ImageNet. We found several published trained models, e.g. GoogLeNet from the Caffe model zoo. For a problem, we decided to use dog breed classification. That is, given a picture of a dog, can we automatically identify the breed? This is actually a class project from Stanford University with student reports, such as this one from David Hsu.
We started from the GoogLeNet model and created our own model trained on the Stanford Dogs Dataset using a system similar to the IBM S822LC for HPC systems with NVIDIA Tesla P100 GPUs connected to the CPU with NVIDIA NVLink. As David remarked in his report, without GPUs, it takes a very long time to train a deep learning model on even a small-sized dataset.
Using a previous generation IBM S822LC OpenPOWER system with a NVIDIA Tesla K80 GPU, we were able to train our model in only a few hours. The IBM S822LC for HPC systems not only features the most powerful NVIDIA Tesla P100 GPUs, but also two IBM POWER8 processors interconnected with powerful NVIDIA NVLink adapters. These systems make data transfers between main memory and GPUs significantly faster compared to systems with PCIe interconnects.
Doggy Docker for Deep Learning
We put our Caffe model and our classification code written in Python into a web application inside a Docker container and deployed it with Apache Mesos and Marathon. Apache Mesos is an open source cluster management application with fine-grained resource scheduling features which now recognize GPUs as cluster-wide resources.
In addition to Apache Mesos, it is possible to run cluster managers, such as Kubernetes, Spectrum Conductor for Containers, and Docker GPU management components, such as nvidia-docker on OpenPOWER systems (see presentation). In addition to Caffe, it is possible to run other popular deep learning frameworks and tools such as Torch, Theano, DIGITS and TensorFlow on OpenPOWER systems.
This Dog Will Hunt
Our little GPU-accelerated pet breed classification micro-service is running in a Docker container and can be accessed at this link from a mobile device or laptop. See for yourself!
For example, given this image link from a Google search for “dog images”, https://www.petpremium.com/pets-pics/dog/german-shepherd.jpg, we got this correct classification in 0.118 secs:
You can also spin up your own GPU Docker container with deep learning libraries (e.g. Caffe) in the NIMBIX cloud and train your own model and develop your own accelerated classification example.
Give it a try and share your screenshots in the comments section below!