Abstract

The Getting Started With Caffe In DIGITS guide provides an overview on using DIGITS with Caffe.

1. Overview Of DIGITS

The Deep Learning GPU Training System™ (DIGITS) puts the power of deep learning into the hands of engineers and data scientists.

DIGITS is not a framework. DIGITS is a wrapper for NVCaffe™ , Torch™ , and TensorFlow™ ; which provides a graphical web interface to those frameworks rather than dealing with them directly on the command-line.

DIGITS can be used to rapidly train highly accurate deep neural network (DNNs) for image classification, segmentation, object detection tasks, and more. DIGITS simplifies common deep learning tasks such as managing data, designing and training neural networks on multi-GPU systems, monitoring performance in real time with advanced visualizations, and selecting the best performing model from the results browser for deployment. DIGITS is completely interactive so that data scientists can focus on designing and training networks rather than programming and debugging.

2. Limitations

DIGITS for Windows depends on Windows branch of BVLC Caffe. The following layers, required for DetectNet feature, are not implemented in that branch.

  • detectnet_transform_layer
  • l1_loss_layer

As a result, DIGITS for Windows does not support DetectNet. To run DIGITS with DetectNet, please use NV-Caffe 0.15 or above on Ubuntu.

3. Prerequisites

Prerequisites for using Caffe with DIGITS include:

  • Python2
  • CUDA 7.5
  • CuDNN 5.1
  • Caffe
  • Graphviz

Installing Prerequisites

Follow these instructions to install the required software components.

Python 2

  • Download and install Python 2.7.11 64bit from Python's official site (https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi). Please select Add Python Path during installation.
  • Download numpy, scipy, matplotlib, scikit-image, h5py from Unofficial Windows Binaries for Python Extension Packages webpage at (http://www.lfd.uci.edu/~gohlke/pythonlibs/). Remember to download correct version (2.7) and architecture (64-bit).
  • Additionally, download gevent v1.0.2 at the same site. Run command prompt (cmd.exe) as administrator, and issue the following commands:
    python -m pip install cython
    python -m pip install numpy-1.11.0+mkl-cp27-cp27m-win_amd64.whl
    python -m pip install scipy-0.17.0-cp27-none-win_amd64.whl
    python -m pip install matplotlib-1.5.1-cp27-none-win_amd64.whl
    python -m pip install scikit_image-0.12.3-cp27-cp27m-win_amd64.whl
    python -m pip install h5py-2.6.0-cp27-cp27m-win_amd64.whl
    

If the installation process complains compiler not found, you need to install Microsoft Visual C++ Compiler for Python 2.7, available at https://www.microsoft.com/en-us/download/details.aspx?id=44266. Nvidia recommend installing it using:

msiexec /i VCForPython27.msi ALLUSERS=1

After that compiler is installed, finish the above python -m pip install commands. Install gevent after installing DIGITS.

CUDA 7.5

Go to NVIDIA CUDA (https://developer.nvidia.com/cuda-downloads) to get CUDA 7.5. Please select Windows 7 to download.

cuDNN 5.1

Go to the NVIDIA cuDNN website (https://developer.nvidia.com/cudnn) to download CuDNN 5.1. Please select CuDNN 5.1 for CUDA 7.5.

Caffe

You can get Caffe at (https://github.com/bvlc/caffe/tree/windows). Note you need to install Visual Studio 2013 to build Caffe. Before building it, enable Python support, CUDA and CuDNN by following instructions on the same page. Because we are using Official CPython, please change the value of PythonDir tag from C:\Miniconda2\ to C:\PYTHON27\ (assume your CPython installation is the default C:\PYTHON27). After building it, configure your Python environment to include pycaffe, which is described at (https://github.com/bvlc/caffe/tree/windows#remark). Your caffe.exe will be inside Build\x64\Release directory (if you made release build).

Graphviz

Graphviz is available at (www.graphviz.org/Download.php). Please note this site is not always available online. The installation directory can not contain a space, so don't install it under the c:\Program Files (x86) directory. Instead use a directory name like c:\graphviz. When the installation directory contains space, pydot could not launch the dot.exe file, even it has no problem finding it. Add the c:\graphviz\bin directory to your PATH.

Installing DIGITS

Clone DIGITS from github.com (https://github.com/nvidia/digits). Run as administrator, from the command prompt, cd to the DIGITS directory. Enter:

python -m pip install -r requirements.txt

You may see an error about Pillow, like ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting. If this is the case, download Pillow Windows Installer (Pillow-3.1.1.win-amd64-py2.7.exe) at https://pypi.python.org/pypi/Pillow/3.1.1 and run the exectuables. After installing Pillow as described above, run
python -m pip install -r requirements.txt
again.

After the above command, check if all required Python dependencies are met by comparing requirements.txt and output of the following command:

python -m pip list

If gevent is not v1.0.2, install it from the whl file, downloaded previously from (http://www.lfd.uci.edu/~gohlke/pythonlibs/).

python -m pip install gevent-1.0.2-cp27-none-win_amd64.whl

It should uninstall the gevent you had, and install gevent 1.0.2.

Because readline is not available in Windows, you need to install one additional Python package.

python -m pip install pyreadline

Running DIGITS

Add the Caffe executable if it is not included in your PATH environment variable.

set PATH=%PATH%;MY_CAFFE_ROOT\Build\x64\Release

Replace MY_CAFFE_ROOT with your local Caffe directory. Launch DIGITS devserver using the following command:

python digits-devserver

Use your browser to navigate to localhost:5000. You should be able to see DIGITS.

Troubleshooting

For troubleshooting tips see the Nvidia DIGITS Troubleshooting and Support Guide.

DIGITS crashes when trying to classify images

This issue should have been resolved. However, if you still encounter this issue, this seems related to different hdf5 DLL binding between pycaffe and h5py. The DLL used by pycaffe was pulled from nuget, and its version is 1.8.15.2. Slightly older than the DLL in h5py. A temporary solution is to load h5py before pycaffe. To force loading h5py before pycaffe, you can either add one line at the beginning of digits-devserver file, or import h5py just before import caffe in digits/config/caffe_option.py.

Import readline causes ImportError

Change import readline in digits\config\prompt.py to

try:
    import readline
except ImportError:
    import pyreadline as readline

Support

For the latest Release Notes, see the DIGITS Release Notes Documentation website.

For more information about DIGITS, see:
Note: There may be slight variations between the nvidia-docker images and this image.

Notices

Notice

THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.

THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.

NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.

Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.

Trademarks

NVIDIA, the NVIDIA logo, and cuBLAS, CUDA, cuDNN, cuFFT, cuSPARSE, DIGITS, DGX, DGX-1, DGX Station, GRID, Jetson, Kepler, NVIDIA GPU Cloud, Maxwell, NCCL, NVLink, Pascal, Tegra, TensorRT, Tesla and Volta are trademarks and/or registered trademarks of NVIDIA Corporation in the Unites States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.