0% found this document useful (0 votes)
27 views28 pages

9 CNN

The document discusses convolutional neural networks (CNNs) and their use in deep learning. It describes the basic architecture of CNNs, including convolutional layers, pooling layers, and fully connected layers. It provides examples of popular CNN models like LeNet, AlexNet, VGG, GoogLeNet, and ResNet. The document also discusses hyperparameters that impact CNN performance and limitations of standard CNNs for problems with a variable number of outputs.

Uploaded by

Eng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views28 pages

9 CNN

The document discusses convolutional neural networks (CNNs) and their use in deep learning. It describes the basic architecture of CNNs, including convolutional layers, pooling layers, and fully connected layers. It provides examples of popular CNN models like LeNet, AlexNet, VGG, GoogLeNet, and ResNet. The document also discusses hyperparameters that impact CNN performance and limitations of standard CNNs for problems with a variable number of outputs.

Uploaded by

Eng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Convolutional Neural Network

(CNN)—Deep Learning
Dr. Ouiem Bchir

https://medium.com/
Convolutional Neural Network (CNN)—
Deep Learning

https://medium.com/
https://medium.com/
https://medium.com/
Figure 5: 3 x 3 Output matrix
 Convolution of an image with different filters can perform
operations such as edge detection, blur and sharpen by applying
filters.

https://medium.com/
https://medium.com/
Figure 6 : Stride of 2 pixels
Padding

https://medium.com/
https://medium.com/
Pooling Layer

https://medium.com/
https://medium.com/
https://medium.com/
CNN Architectures—LeNet, AlexNet, VGG,
GoogLeNet and ResNet

https://medium.com/
ImageNet

https://medium.com/
https://medium.com/
https://medium.com/
Figure 3 : LeNet-5 Architecture

https://medium.com/
https://medium.com/
https://medium.com/
GoogLeNet

https://medium.com/
https://medium.com/
ResNet (2015)
 In Residual network, it directly copy the input matrix to
the second transformation output and sum the output in
final ReLU function.

https://medium.com/
Hyperparameters

 There are a set of hyperparameters that play a crucial


role in the configuration of CNN, and thus in its model
learning, such as:
 the learning rate,
 the weight decay,
 the momentum,
 the batch size, and
 the number of epochs

https://medium.com/
Hyperparameters
 The learning rate hyperparameter controls the amount of
modification of the CNN model as a result of an estimated
error when the weights are updated. A too small value yields a
long training time, while a too large value yields missing the
optimal weights and learning sub-optimal ones.

 The weight decay is the scale by which the term sum of


squares weights, in the error function is multiplied with in
order to avoid the case of a large loss and obtain the trivial
solution where the weights are equal to zero. A too large value
results in a situation where the model will not fit well while a
too small value yields a long training time.

https://medium.com/
Hyperparameters

 The momentum hyperparameter is the ratio of the


gradient retained at each iteration in order to accumulate the
gradient of previous iterations.

 The batch size is the number of training instances used


before updating the model weights.

 The number of epochs is the number of cycles the model


is trained using all the training set.

https://medium.com/
Limitation

https://medium.com/
Limitation
 The major reason why you cannot proceed with this
problem by building a standard convolutional network
followed by a fully connected layer is that, the length of
the output layer is variable — not constant, this is
because the number of occurrences of the objects of
interest is not fixed.

 A naive approach to solve this problem would be to take


different regions of interest from the image, and use a
CNN to classify the presence of the object within that
region.

https://medium.com/
Limitation
 The problem with this approach is that the objects of
interest might have different spatial locations within the
image and different aspect ratios.

 Hence, you would have to select a huge number of


regions and this could computationally blow up.
Therefore, algorithms like R-CNN, YOLO etc have been
developed to find these occurrences and find them fast.

https://medium.com/

You might also like