Convolutional Neural Networks
Convolutional Neural Networks
Networks
Dr. N. Sripriya
Associate Professor
Department of Information Technology
SSN College of Engineering
[email protected]
Agenda
• Introduction
• Benefits of CNN
• Research directions
Introduction
Deep Learning is a machine learning technique that can learn useful
representations or features directly from images, text and sound
Why CNN?
Why CNN?
Convolutional Neural Network
Input
Filter
output
2D-Convolution Operation
2D - Convolution operation
Convolution operation
Convolution operation
Convolution operation
Convolution operation
Feature Detector/ Filter-1
Feature Detector/ Filter-2
Feature Detector/ Filter-3
Convolution operation
Convolution operation
These are the network
parameters to be learned.
1 -1 -1
1 0 0 0 0 1 -1 1-1 Filter 1
0 1 0 0 1 0 -1 -1 1
0 0 1 1 0 0
1 0 0 0 1 0 -1 1 -1
-1 1 -1 Filter 2
0 1 0 0 1 0
0 0 1 0 1 0 -1 1 -1
…
Each filter detects a
small pattern (3 x 3)
Step 1(B) ReLu layer
• Rectifier is a simple activation function defined as
f (x) = max(0, x)
• Neuron using rectifier is popularly known as ReLU (Rectified Linear Unit)
• It has been shown that ReLU converges faster than networks using
traditional ’tanh’
Step 2 – Max Pooling
Why Pooling?
Why Pooling?
Subsampling
Subsampling pixels will not change the
object
We can subsample the pixels to make image smaller
fewer parameters to characterize the image
Max Pooling
Step 3 - Flattening
Step 4 – Fully connected layer
The whole CNN
Convolution
Max Pooling
Max Pooling
Flattene A new
d image
Why multiple Convolutional layers?
Learning Multiple levels of representation
Benefits of CNN
• Sparse connections
reduces model parameters and improves generalization
• Locality
Locality in the units of the convolution layer allows more
robustness against non-white noise.
• Weight Sharing
A weight sharing strategy leads to a significant reduction in the
number of parameters that have to be learned.
• Pooling
This leads to minimal differences in the features extracted by the
pooling layer when the input patterns are slightly shifted along the
frequency dimension.
Convolution v.s. Fully Connected
1 0 0 0 0 1 1 -1 -1 -1 1 -1
0 1 0 0 1 0 -1 1 -1 -1 1 -1
0 0 1 1 0 0 -1 -1 1 -1 1 -1
1 0 0 0 1 0
0 1 0 0 1 0
0 0 1 0 1 0 convolution
image
x1
1 0 0 0 0 1
0 1 0 0 1 0
Fully- x2
0 0 1 1 0 0
connected 1 0 0 0 1 0
…
…
…
…
0 1 0 0 1 0
0 0 1 0 1 0
x36
1 -1 -1 Filter 1 1 1
-1 1 -1 2 0
-1 -1 1 3 0
4 0 3
1 0 0 0 0 1
0 1 0 0 1 0 0
0 0 1 1 0 0 8 1
1 0 0 0 1 0 9 0
0 1 0 0 1 0 0: 0
0 0 1 0 1 0
13 0
14 0
fewer Only connect to
15 1 9 inputs, not
parameters! 1 fully connected
1 -1 -1 1 1
-1 1 -1 0
-1 -1 1 0
:4 0 3
1 0 0 0 0 1
0 1 0 0 1 0 0
0 0 1 1 0 0 1
1 0 0 0 1 0 0 -
1
0 1 0 0 1 0 0
0 0 1 0 1 0
0
0
Fewer 5 1
parameters Shared weights
Even fewer 1
parameters
A CNN compresses a fully connected network
in two ways: