Deep Learning Tutorials
Contents
1. Get started with DeepSense
Follow all the steps from Getting started and Getting started with Deep Learning. This tutorial assumes you can log on to the DeepSense compute platform and have a version of Anaconda python on your path with Tensorflow and Pytorch installed in an anaconda environment.
2. Tensorflow Preparation
Download the example notebooks
git clone https://github.com/aymericdamien/TensorFlow-Examples.git
request a gpu session
bsub -Is -q gpu bash
activate your anaconda environment
conda activate tensorflow
Note: this assumes you've followed the getting started instructions and have created a python environment called tensorflow
with the tensorflow-gpu
package installed from the IBM-AI repository. If not then please follow those instructions.
start a jupyter notebook
jupyter notebook --no-browser --ip=0.0.0.0
open an SSH tunnel to access the notebook
just as we did in the Getting started with Deep Learning tutorial, open an SSH tunnel in another window
ssh -l <user> login1.deepsense.ca -L <port>:ds-cmgpu-<num>:<port>
open the notebook in your browser
In a web browser navigate to the page listed in the jupyter notebook output. Remember to replace the node name with localhost
3. Tensorflow Example Notebooks
1. helloworld.ipynb
TensorFlow-Examples/notebooks/1_Introduction/helloworld.ipynb
This is an introduction to a python jupyter notebook.
Select a box with code. Press the shift and enter keys together to run the code in that box. You'll notice a star appear beside running code and a number in brackets appear beside finished code to indicate the order in which code boxes were run.
Often in an example notebook you will see code that already has output cached. You still need to run all previous code boxes and may want to use the menu to clear all output. If there is an error then you can modify the code or fix the error (e.g. download a dependency) and try again.
If you are missing a required dependency in later notebooks then you can install that package into your anaconda environment in a terminal window and it will be immediately accessible from the notebook. You do not need to close and restart the notebook or SSH tunnel.
You can also run the entire notebook using the menu.
When you are finished with a notebook you should use the menu to halt the kernel before closing the notebook. This clears resources such as GPU memory.