Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Deep Learning

ImageDataGenerator Class
Convolutional Neural Network (CNN)
• A Convolutional Neural Network, also known as CNN or ConvNet, is a
class of neural network that specializes in processing data such as
images. It contains a series of pixels arranged in a grid like fashion
that contains pixel values to denote how bright and what color that
each pixel has.
Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)
• CNN typically has three layers:
1) Convolutional Layer.
2) Pooling Layer.
3) Fully connected or Dense Layers .
Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)
• The primary purpose of convolutional layer is to extract the features
of the input images.

• The Output of convolutional layer can be calculated by:

𝑛
y=σ𝑖 𝑥 ∗𝑓
Convolutional Neural Network (CNN)
• If we have an input of size W x W x D and Dout number of kernels
with a spatial size of F with stride S and amount of padding P, then
the size of output volume can be determined by the following
formula:

𝑊 − 𝐹 + 2𝑃
𝑊𝑜𝑢𝑡 = +1
𝑆
Convolutional Neural Network
Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)
• ReLU stands for rectified linear unit and it’s a type of activation
functions.
• F(x)=max(0,x).
2 3 2 2 3 2
0 2 1 0 2 1
-2 1 0 0 1 0
Input of ReLU Output of ReLu
Convolutional Neural Network
(Pooling Layer)
• Pooling layers will reduce the number of parameters when the inputs
are too large.
• Polling also called down sampling which reduces the dimensionality
of each map but retains important information.
• There are three types of pooling layers namely, Max Pooling, Average
Pooling, Sum pooling.
Convolutional Neural Network
(Pooling Layer)
• The most popular process is max pooling, which reports the
maximum output from the neighborhood.
Convolutional Neural Network (Flatten Layer)
• The feature matrix will be converted as vector.

6
6 8 8
3 4 3
4
Input Output
Convolutional Neural Network (Fully
Connected Layer)
• In Fully connected layer, neurons in this layer have full connectivity
with all neurons in the preceding and succeeding layer as seen in
regular FCNN. This is why it can be computed as usual by a matrix
multiplication followed by a bias effect.

• The FC layer helps to map the representation between the input and
the output.
Convolutional Neural Network (Fully
Connected Layer)

You might also like