Getting started with Deep Learning

From DeepSense Docs
Revision as of 16:56, 13 September 2019 by Cwhidden (talk | contribs) (3. Request an interactive session on a GPU compute node)
Jump to: navigation, search

1. Get started with DeepSense

Follow all the steps from Getting started. This tutorial assumes you can log on to the DeepSense compute platform and have a version of Anaconda python on your path.

2. Download Caffe samples to your home directory


3. Request an interactive session on a GPU compute node

bsub -Is -gpu - bash

4. Start a python2 Jupyter notebook

Source the Caffe deep learning toolkit

source /opt/DL/caffe/bin/caffe-activate

Start the notebook

jupyter notebook --no-browser --ip=

Sample output

[I 13:32:23.937 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:32:23.937 NotebookApp] 
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:

Copy the URL, host, and port

Copy the URL but don’t paste it in your browser yet.

Make a note of which compute host and port the notebook is running on (e.g. host ds-cmgpu-04 and port 8888 in this case)

5. Port Forwarding

In a separate terminal window from your local computer, forward your local port to the remote host:

ssh -l <username> -L <port>:<remote_host>:<port>

for example, ssh -l user1 -L 8888:ds-cmgpu-04:8888

Enter the copied URL in your web browser but change the remote host name to “localhost” before pressing enter.

e.g http://localhost:8888/?token=68042f40a10b500f3747ae0a232ee209fa4bf1aa384d29ba&token=68042f40a10b500f3747ae0a232ee209fa4bf1aa384d29ba

6. Open the desired sample notebook

Be sure to enter the location of the “caffe-samples” directory in your home directory as your caffe-root in the Caffe example notebooks.

7. Enjoy Deep Learning on DeepSense!

8. More information

Go to Caffe's website for tutorials and example programs that you can run to get started. See the following links to a couple of the example programs:

LeNet MNIST Tutorial - Train a neural network to understand handwritten digits.

CIFAR-10 tutorial - Train a convolutional neural network to classify small images.

9. Using another deep learning toolkit such as Tensorflow

  • Ensure any Anaconda dependencies are installed
    • for tensorflow, run /opt/DL/tensorflow/bin/install_dependencies
  • Source the appropriate toolkit instead of caffe-activate
    • e.g. source /opt/DL/tensorflow/bin/tensorflow-activate
  • Download example notebooks for the deep learning toolkit to your home directory,

The TensorFlow home page has various information, including Tutorials, How-To documents, and a Getting Started guide.

Additional tutorials and examples are available from the community, for example: