Deep Neural Networks (DNN) are an advanced branch of machine learning. Unlike traditional machine learning, neural networks are modeled around biological neurons. Each neural network has multiple layers of neurons that work in tandem to perform a task.
Deep learning differs from traditional machine learning techniques in that they can automatically learn representations from data such as images, video or text, without introducing hand-coded rules or human domain knowledge. Their highly flexible architectures can learn directly from raw data and can increase their predictive accuracy when provided with more data.
Modern artificial intelligence that powers self-driving cars, cancer detection, intelligent voice assistants, and fraud detection in the financial sector are powered by neural networks.
Even though DNNs are much powerful than traditional machine learning algorithms, they are difficult to learn and implement. The complex computation performed by the neurons is delegated to Graphics Processing Unit (GPU) where multiple cores are exploited to parallelize the calculations. This architecture makes debugging neural networks extremely hard.
Multiple frameworks such as TensorFlow, Microsoft Cognitive Toolkit (CNTK), Apache MXNet, and PyTorch are used to build DNNs. These frameworks are designed to take advantage of underlying GPU infrastructure to perform faster computation.
Developers often find it difficult to get started with DNNs due to the steep learning curve. Within DNNs, there are different approaches for dealing with images, video, voice, text, and time-series data. For examples, Convolutional Neural Networks (CNN) are used for classifying images. Face detection, face recognition, object detection, and video analytics employ advanced CNN techniques. Natural Language Processing (NLP) relies on Recurrent Neural Networks (RNN) to perform advanced text analytics. Long Short-Term Memory (LSTM) algorithm is used with time-series data for predictive analytics.
Different deep learning toolkits are preferred for dealing with different scenarios. The complexity of neural networks combined with the fragmentation of toolkits makes it extremely hard to implement DNNs.
Nvidia DIGITS — The Wizard-Style Front-End to Deep Learning Frameworks
Back in 2015, Nvidia introduced Deep Learning GPU Training System (DIGITS), which is a tool for developing, training and visualizing deep neural networks. It brings the power of deep learning through an intuitive browser-based interface, to enable data scientists and researchers to design DNNs for their data using real-time network behavior visualization. DIGITS is an open-source software available on GitHub.
Currently, in version 6, DIGITS has come a long way. It can now interactively train models using TensorFlow and visualize the architecture using TensorBoard. Developers can create custom plug-ins for importing special data formats such as DICOM used in medical imaging. The platform comes with popular neural network architectures based on AlexNet, LeNet, and GoogLeNet. The most recent version has a pre-trained UNET model for image segmentation of medical images.
DIGITS aims to simplify deep learning tasks by abstracting various steps involved in building a model. It also acts as an abstraction to popular frameworks such as TensorFlow, Caffe, and Torch. It takes advantage of the GPUs to parallelize the training jobs. You cannot run Nvidia DIGITS on a machine without the GPU.
The DIGITS interface includes tools for DNN optimization. From importing datasets to splitting them for training and testing, and training the model, developers can use DIGITS for building end-to-end neural networks. The main console lists existing databases and previously trained network models available on the machine, as well as the training activities in progress. Users can track adjustments made to network configuration and maximize accuracy by varying parameters such as bias, neural activation functions, pooling windows, and layers.
One of the advantages of DIGITS is that it can train multiple networks on the same data set in parallel, or train the same network on multiple datasets in parallel. With the GPU selection option, you can select the GPUs to use for training each data set, making it easier to multitask with your hardware.
It is also possible to monitor the progress through an interactive dashboard. You can stop the training when loss gets minimized and accuracy reaches a reasonable level. DIGITS persists the model and the hyperparameters for each epoch. Once the training is complete, you can download the model along with the weights to run it for inference.
Installing and Configuring Nvidia DIGITS
There are three ways to get started with DIGITS — build from the source code, launch a cloud-based VM, or run a Docker container.
To experiment with DIGITS, you can launch an EC2 instance, Azure VM or a GCE instance backed by a Nvidia Tesla P100 or K80 GPUs. There are pre-configured VM templates available on both AWS and Azure marketplace. You can also launch a GPU Linux box at Paperspace.
Running DIGITS as a container is the easiest and cheapest option. But remember, you can run this only on a machine powered by a GPU. The image runs on a fully configured Ubuntu machine with latest Nvidia GPU driver, CUDA software, cuDNN toolkit and Nvidia-Docker runtime.
The latest container image can be pulled from Nvidia GPU Cloud (NGC) registry. The following one-line command will run DIGITS container on your machine.
$ nvidia-docker run --name digits -d -p 5000:5000 nvcr.io/nvidia/digits
If you want to mount a host directory within the container, you can add a volume
$ nvidia-docker run --name digits -d -p 8888:5000 -v data:/data:ro -v jobs:/workspace/jobs nvcr.io/nvidia/digits
Once the container is running, you can access the web interface available at port 5000.
In the next article, I will walk you through all the steps involved in training a CNN and running it for inference on a local machine with just the CPU. It includes all the key concepts from acquiring the data to performing predictions. Stay tuned!
The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Docker.