Académique Documents
Professionnel Documents
Culture Documents
Hyungon Ryu
Certified Instructor, NVIDIA Deep Learning Institute
NVIDIA Corporation
1
DEEP LEARNING INSTITUTE
DLI Mission
9
Machine Learning
Neural Networks
Deep
Learning
10
DEEP LEARNING EVERYWHERE
INTERNET & CLOUD MEDICINE & BIOLOGY MEDIA & ENTERTAINMENT SECURITY & DEFENSE AUTONOMOUS MACHINES
Image Classification Cancer Cell Detection Video Captioning Face Detection Pedestrian Detection
Speech Recognition Diabetic Grading Video Search Video Surveillance Lane Tracking
Language Translation Drug Discovery Real Time Translation Satellite Imagery Recognize Traffic Sign
Language Processing
Sentiment Analysis
Recommendation
11
ARTIFICIAL NEURONS
w1 w2 w3
x1 x2 x3
From Stanford cs231n lecture notes
Weights (Wn)
= parameters y=F(w1x1+w2x2+w3x3)
13
MLP
Input
Hidden Output
Layer
Layer Layer
1 W11_1
1 W21_1
2
1
2
3
2
3
W23_2
4 W14_3
14
ANN for MNIST
Input
Hidden Output
Layer
Layer Layer
28x28=784
1 W11_1
1 W21_1
2
1
9
84
W23_2
784 W14_3
15
Pre-processing + ANN for MNIST
Input
Hidden Output
features 768 x N Layer
Layer Layer
1 W11_1
1 W21_1
2
1
9
84
W23_2
768
xN W14_3
16
Feature with Convolution Filter
sharpen
-1 -1 -1
-1 9 -1
-1 -1 -1
17
CONVOLUTION Center element of the kernel is
placed over the source pixel.
0 The source pixel is then
0 replaced with a weighted sum
0
0 0 of itself and nearby pixels.
0 0
0 1
0 1 0
1 1
1 2
0 2 0
2 1
1 2
0 2 0 0
2 1 0
1 2 4
0 2 0 0
Source 1 1 0
0 1 0
Pixel 0 1 0 -4
1 1 0
0 1 0 -8
0 1
1
0
0 Convolution
kernel (a.k.a.
filter) New pixel value
(destination
pixel)
18
ARTIFICIAL NEURAL NETWORK
A collection of simple, trainable mathematical units that collectively
learn complex functions
Hidden layers
Given sufficient training data an artificial neural network can approximate very complex
functions mapping raw data to output decisions
19
DEEP NEURAL NETWORK (DNN)
Raw data Low-level features Mid-level features High-level features
Application components:
Task objective
e.g. Identify face
Training data
10-100M images
Network architecture
~10s-100s of layers
1B parameters
Input Result
Learning algorithm
~30 Exaflops
1-30 GPU days
20
DEEP LEARNING APPROACH
Train:
Errors
Dog
Dog
Cat
DNN Cat
Raccoon
Honey badger
Deploy:
DNN Dog
21
DEEP LEARNING APPROACH - TRAINING
Process
• Forward propagation
yields an inferred label
Forward propagation for each training image
22
ADDITIONAL TERMINOLOGY
• Hyperparameters – parameters specified before training begins
• Can influence the speed in which learning takes place
• Can impact the accuracy of the model
• Examples: Learning rate, decay rate, batch size
23
HANDWRITTEN DIGIT RECOGNITION
24
HANDWRITTEN DIGIT RECOGNITION
HELLO WORLD of machine learning?
27
NVIDIA Powers Deep Learning
Every major DL framework leverages NVIDIA SDKs
Mocha.jl
28
WHAT IS CAFFE?
An open framework for deep learning developed by the Berkeley
Vision and Learning Center (BVLC)
31
NVIDIA DIGITS
Interactive Deep Learning GPU Training System
Process Data Configure DNN Monitor Progress Visualization
32
NVIDIA’S DIGITS
Interactive Deep Learning GPU Training System
• Managing data
• Open source
33
DIGITS - HOME
Clicking
DIGITS
will
bring
you to
this
Home
screen
Can
anneal
the
learning
rate
Annealed learning
rate
37
DIGITS - VISUALIZATION
Once training is
complete DIGITS
provides an easy way to
visualize what
happened
38
DIGITS – VISUALIZATION RESULTS
39
DIGITS PLUGINS
41
NAVIGATING TO QWIKLABS
1. Navigate to:
https://nvlabs.qwiklab.com
42
ACCESSING LAB ENVIRONMENT
43
LAUNCHING THE LAB ENVIRONMENT
5. Click on the Select
button to launch the
lab environment
• After a short
wait, lab
Connection
information will
be shown
44
LAUNCHING THE LAB ENVIRONMENT
45
CONNECTING TO THE LAB ENVIRONMENT
7. Click on “here” to
access your lab
environment /
Jupyter notebook
46
CONNECTING TO THE LAB ENVIRONMENT
47
JUPYTER NOTEBOOK
2. Click the
1. Place “run cell”
your button
cursor in
the code 2. Confirm you
receive the
same result
48
STARTING DIGITS
Instruction in
Jupyter notebook
will link you to
DIGITS
49
ACCESSING DIGITS
• Will be prompted to
enter a username to
access DIGITS
• Can enter any
username
• Use lower case
letters
50
LAB DISCUSSION / OVERVIEW
51
CREATE DATASET IN DIGITS
• Dataset settings
• Image Type: Grayscale
• Image Size: 28 x 28
• Training Images: /home/ubuntu/data/train_small
• Select “Separate test images folder” checkbox
• Test Images: /home/ubuntu/data/test_small
• Dataset Name: MNIST Small
52
CREATE MODEL
/home/ubuntu/data/test_small/2/img_4415.png
53
EVALUATE THE MODEL
Accuracy
obtained from
validation dataset
Loss function
(Validation)
Loss function
(Training)
54
ADDITIONAL TECHNIQUES TO IMPROVE MODEL
• Data augmentation
55
LAB REVIEW
56
FIRST RESULTS
Small dataset ( 10 epochs )
8 : 85.07 %
0 : 99.00 %
8 : 99.69 %
8 : 54.75 %
57
FULL DATASET
6x larger dataset
• Dataset
• Training Images: /home/ubuntu/data/train_full
• Test Image: /home/ubuntu/data/test_full
• Dataset Name: MNIST full
• Model
• Clone “MNIST small”.
• Give a new name “MNIST full” to push the create button
58
SECOND RESULTS
Full dataset ( 10 epochs )
8 : 85.07 % 8 : 79.72 %
0 : 99.00 % 0 : 95.82 %
8 : 99.69 % 8 : 100.0 %
8 : 54.75 % 2 : 70.57 %
59
DATA AUGMENTATION
Adding Inverted Images
• Training Images:
/home/ubuntu/data/train_invert
• Test Image:
/home/ubuntu/data/test_invert
• Dataset Name: MNIST invert
60
DATA AUGMENTATION
Adding inverted images ( 10 epochs )
layer { layer {
name: "pool1“ name: "conv1"
type: "Pooling“ type: "Convolution"
… ...
} convolution_param {
num_output: 75
layer { ...
name: "reluP1" layer {
type: "ReLU" name: "conv2"
bottom: "pool1" type: "Convolution"
top: "pool1" ...
} convolution_param {
num_output: 100
layer { ...
name: "reluP1“
62
MODIFY THE NETWORK
Adding ReLU Layer
63
MODIFIED NETWORK
Adding filters and ReLU layer ( 10 epochs )
65
www.nvidia.com/dli
68