You are on page 1of 14

Deep Neural Network(DNN)

The input The input


data data convolutional,
pooling Layers

fully connected layers

fully connected layers

Convolutional Neural
Networks (CNN/ConvNet)

Operations 1. Filter + Convolution


2. poolling
Feature Detection Classification
Convolutional Layer

pooling Layer
structure of a CNN

fully connected Layer


6x6
1 0 0 0 0 1
L3
L2 L1 … F1 F2

0 1 0 0 1 0 w1
w3 w2 F3
L4 w4
0 0 1 1 0 0 F4
1 0 0 0 1 0 L5
w5 Max pooling
0 1 0 0 1 0 w6
X R(X) F5

L6
0 0 1 0 1 0 w7 F6

L7 w8 F7
w9
L8 L9
… F9
F8

Rectified Feature
Map(R(X))
Feature Map(X)
F1 F2 F3 F4
F1 F2 F3 F4
Filter or Kernel Local region F5 F6 F7 F8
Max
F5 F6 F7 F8 Relu pooling
w1 w2 w3 L1 L2 L3
w4 w5 w6
× L7L4 L5 L6 = F9 F10 F11 F12
F9 F10 F11 F12

F13 F14 F15 F16


w7 w8 w9 L8 L9 F13 F14 F15 F16
Filter + convolution operation
Filter 1
1 -1 -1
-1 1 -1
stride=1
-1 -1 1
1 0 0 0 0 1
0 1 0 0 1 0
3 -1 -3 -1
0 0 1 1 0 0
1 0 0 0 1 0
-3 1 0 -3
0 1 0 0 1 0 Feature
0 0 1 0 1 0 Map
-3 -3 0 1

6 x 6 image 3 -2 -2 -1
Rectified Linear Unit (RelU)
6x6
1 0 0 0 0 1
L3
L2 L1 … 3 0
0 1 0 0 1 0 w3
w2 w1
0
L4 w4
0 0 1 1 0 0
0
1 0 0 0 1 0 L5
w5
0 1 0 0 1 0 w6
X R(X) 0 Max pooling
0 0 1 0 1 0 L6 w7 1
w8
L7 w9 0
L8
L9
… 0
0

4x4
Rectified Feature
Filter or Kernel Feature Map (X) Map (R(X))
Local region
w1 w2 w3 L1 L2 L3 3 -1 -3 -1 3 0 0 0 Max
w4 w5 w6
w7 w8 w9
× L7L4 L5
L8
L6
L9
= -3 1 0 -3
-3 -3 0 1
Relu
0 1
0 0
0 0
pooling

0 1
3 -2 -2 -1 3 0 0 0
Padding is a technique that avoids the loss of information on the input data borders, caused by the kernel
operations, and consists of adding zeros around the input margins
Convolutional Layer

pooling Layer
structure of a CNN

fully connected Layer


The most common techniques applied on these layers are
max pooling and average pooling.

max Pooling operation


3 -1 -3 -1

-3 1 0 -3
6 x 6 image
3
1 0 0 0 0 1
L3
L2 L1 … 3
0
1
0
0 1 0 0 1 0 w3
w2 w1
0
L4 w4 1
0 0 1 1 0 0
0 Max pooling
1 0 0 0 1 0 w5 1
L5
0 1 0 0 1 0 w6
X R(X) 0
1
0 0 1 0 1 0 L6 w7 1 0
1 0
w8
0
L7
L8
w9
… 0 0
0
L9

Rectified Feature Size 2*2


Filter or Kernel Local region Feature Map (X) Map (R(X)) Stride = 1
w1 w2 w3 L1 L2 L3 3 -1 -3 -1 3 0 0 0 Max 3 1 0
w4 w5 w6
w7 w8 w9
× L4L7 L5
L8
L6
L9
= -3 1 0 -3
-3 -3 0 1
Relu
0 1
0 0
0 0
pooling

1 1 1
0 1
3 -2 -2 -1 3 0 3 0 1
0 0
Flatten
3
1
0
1
1
1
3
0
1

fully connected layer


Convolutional Layer

pooling Layer
structure of a CNN

fully connected Layer


Dropout

You might also like