0% found this document useful (0 votes)
83 views85 pages

Deep Learning (MODULE-3)

Uploaded by

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

Deep Learning (MODULE-3)

Uploaded by

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

BCSE332L

DEEP LEARNING

Module:3
Module:3
CONVOLUTION NEURAL NETWORKS
1. Foundations of Convolutional Neural Networks

2. CNN operations –
3. Architecture –
4. Simple Convolution Network –
5. Deep Convolutional Models –
(i) ResNet,
(ii) AlexNet,
(iii) InceptionNet and
1:) CONVOLUTION NEURAL NETWORKS
Foundations of Convolutional Neural Networks
Convolutional Neural Networks are a
special type of feed-forward artificial
neural network in which the connectivity
pattern between its neuron is inspired by
the visual cortex.
1:) CONVOLUTION NEURAL NETWORKS
Why Convolutional Neural Networks?
1:) CONVOLUTION NEURAL NETWORKS
Why Convolutional Neural Networks?
1:) CONVOLUTION NEURAL NETWORKS
Why Convolutional Neural Networks?
1:) CONVOLUTION NEURAL NETWORKS
Foundations of Convolutional Neural Networks
1:) CONVOLUTION NEURAL NETWORKS
Foundations of Convolutional Neural Networks
The Convolutional Neural Networks, which
are also called as covnets, are nothing but
neural networks, sharing their parameters.
Suppose that there is an image, which is
embodied as a cuboid, such that it encompasses
length, width, and height.
Here the dimensions of the image are
represented by the Red, Green, and Blue
channels.
1:) CONVOLUTION NEURAL NETWORKS
Foundations of Convolutional Neural Networks
1:) CONVOLUTION NEURAL NETWORKS
Key components of a Convolutional Neural
Network
1:) CONVOLUTION NEURAL NETWORKS
Key components of a Convolutional Neural
Network
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS

CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:

Filters:
are nothing but the Feature Detectors.
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
CNN Operations:
1:) CONVOLUTION NEURAL NETWORKS
Why Convolutional Neural Networks?
1:) CONVOLUTION NEURAL NETWORKS
Why Convolutional Neural Networks?

ReLU – makes Non-Linearity


1:) CONVOLUTION NEURAL NETWORKS
ReLU in Convolutional Neural Networks?
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS

POOLING- Layer is used to Reduce the Size


1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
Benefits of using Pooling Layer:

Reduces dimensions and Computation

Reduce Overfitting as there are less Parameters

Model is Tolerant towards variations, disortions


1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS

Flattening:
1:) CONVOLUTION NEURAL NETWORKS
Fully Connected Layer:
These layers are in the last layer of the convolutional neural
network, and their inputs correspond to the flattened one-
dimensional matrix generated by the last pooling layer. ReLU
activations functions are applied to them for non-linearity.
1:) CONVOLUTION NEURAL NETWORKS
Fully Connected Layer:
1:) CONVOLUTION NEURAL NETWORKS
1:) CONVOLUTION NEURAL NETWORKS
Why Convolutional Neural Networks?
1:) CONVOLUTION NEURAL NETWORKS
CNN Architecture:
1:) CONVOLUTION NEURAL NETWORKS
Advantages of Convolutional Neural
Networks(CNN)
• Good at detecting patterns and features in
images, videos, and audio signals.
• Robust to translation, rotation, and scaling
invariance.
• End-to-end training, no need for manual
feature extraction.
• Can handle large amounts of data and
achieve high accuracy.
1:) CONVOLUTION NEURAL NETWORKS
Disadvantages of Convolutional Neural
Networks (CNNs):
• Computationally expensive to train and
require a lot of memory.
• Can be prone to overfitting if not enough data
or proper regularization is used.
• Requires large amounts of labeled data.
• Interpretability is limited, it’s hard to
understand what the network has learned.
1:) CONVOLUTION NEURAL NETWORKS
Types of convolution neural networks :
A number of variant CNN architectures have
emerged with the introduction of new datasets, such
as MNIST and CIFAR-10, and competitions, like
ImageNet Large Scale Visual Recognition Challenge
(ILSVRC). Some of these other architectures include:
 AlexNet
 VGGNet
 GoogLeNet
 ResNet
 ZFNet
Types of convolution neural networks :
Why ResNet?
Deep Networks are hard to train because
of vanishing gradient problem.
1:) CONVOLUTION NEURAL NETWORKS
Types of convolution neural networks :
ResNet :
Types of convolution neural networks :
ResNet :
Skip Connections
Resnet first introduced the concept of skip connection.
"Add the original input to the output of the convolution
block"
Types of convolution neural networks :
ResNet :

Y=F(x)+X
# make F(X) =0, so that we can make Y=X
Types of convolution neural networks :
ResNet :
Types of convolution neural networks :
ResNet : (Working Process)
Types of convolution neural networks :
ResNet : (Working Process)
Types of convolution neural networks :
ResNet : (Working Process)
Types of convolution neural networks :
ResNet : (Working Process)
Types of convolution neural networks :
ResNet : (Working Process in KERAS)
Types of convolution neural networks :
ResNet : (Working Process in KERAS)
In a Residual block we add Tensors of same
shape !
1:) CONVOLUTION NEURAL NETWORKS
Types of convolution neural networks :
ResNet :
Advantages:
• Deeper networks
ResNet enables the construction of deeper
neural networks, with more than a hundred layers,
which was previously impossible due to the
vanishing gradient problem.
The residual connections allow the Network to
learn better representations and optimize the
gradient flow, making it easier to train deeper
1:) CONVOLUTION NEURAL NETWORKS
Types of convolution neural networks :
ResNet :
Advantages:
• Improved accuracy
ResNet has achieved state-of-the-art performance
on several benchmark datasets, such as ImageNet, CIFAR-
10, and CIFAR-100, demonstrating its superior accuracy
compared to other deep neural network architectures.
• Faster convergence
ResNet enables faster convergence during training,
thanks to the residual connections that allow for better
gradient flow and optimization. This results in faster
training and better convergence to the optimal solution.
1:) CONVOLUTION NEURAL NETWORKS
Types of convolution neural networks :
ResNet :
Dis- Advantages:
 Complexity

 Overfitting

 Interpretability
1:) DEEP CONVOLUTION MODELS
2.) Alexnet:
AlexNet, developed by Alex Krizhevsky, Ilya Sutskever,
and Geoffrey Hinton, is a landmark model that won the
ImageNet Large-Scale Visual Recognition Challenge in
2012.
It introduced several innovative ideas that shaped
the future of CNNs.
1:) DEEP CONVOLUTION MODELS
2.) Alexnet: Why Alexnet?

• Breakthrough Performance: Achieved a significant


improvement in image classification accuracy in 2012.

• Deep Architecture: Utilized a deep network with eight


layers, much deeper than previous models, contributing to
advancements in CNN architectures.
• It was the first GPU based CNN model and was 4 times
faster than previous models.

• Use of GPUs: Leveraged GPUs to speed up training,


significantly enhancing performance and efficiency in
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture:
AlexNet consists of 8 layers, including 5 convolutional
layers and 3 fully connected layers. It uses traditional stacked
convolutional layers with max-pooling in between. Its deep
network structure allows for the extraction of complex
features from images.
The architecture employs overlapping pooling layers to
reduce spatial dimensions while retaining the spatial
relationships among neighbouring features.
Activation function: AlexNet uses the ReLU activation
function and dropout regularization, which enhance the
model’s ability to capture non-linear relationships within the
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture: Advantages
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture: disadvantages

• the depth of this model is very less and hence it


struggles to learn features from image sets.

• We can see that it takes more time to achieve


higher accuracy results compared to future models.
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture:
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture:
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture:
1:) DEEP CONVOLUTION MODELS
2.) Alexnet Architecture:
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
InceptionNet is a convolutional neural
network (CNN) architecture that Google developed to
improve upon the performance of previous CNNs on
the ImageNet Large Scale Visual Recognition
Challenge (ILSVRC) benchmark.
It uses "inception modules" that apply a
combination of 1x1, 3x3, and 5x5 convolutions on the
input data and utilizes auxiliary classifiers to improve
performance.
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
InceptionNet won the 2014 ILSVRC
competition and has been used in various application
Including
- image classification,
- object detection, and
- image segmentation.
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
What is Inception?
InceptionNet is a convolutional neural network
(CNN) designed for image classification tasks and
developed for the ImageNet Large Scale Visual
Recognition Challenge.
InceptionNet is known for using inception
modules, blocks of layers designed to learn a
combination of local and global features from the
input data.
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
What is Inception?
These modules are composed of smaller
convolutional and pooling layers, which are
combined to allow the network to learn spatial and
temporal features from the input data.
InceptionNet was designed to train more
efficiently and faster than other deep CNNs. It has
been widely used in various applications, including
image classification, object detection, and face
recognition.
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
Inception Blocks
Conventional neural networks typically use convolution
and pooling layers to extract features from the input data.
However, these networks are limited in capturing local
and global features, as they typically focus on either one
or the other.
The inception blocks in the InceptionNet
architecture are intended to solve problem of learning
combination combination of local and global
features from the input data.
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
Inception Blocks (1st Module)

Wider Network rather than Deeper


1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
Inception Blocks

Small Information = Small Filter Size


Large Information Area =Bigger Filter Size
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
Inception Blocks (2nd Module)
Dimension Reduction

Less parameters means less


computational resources
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
Inception Blocks (2nd Module)
1:) DEEP CONVOLUTION MODELS
3.) InceptionNet:
Inception Blocks (2nd Module)

How 1x1 Convolution reduce the


Parameters?
1:) DEEP CONVOLUTION MODELS
1:) DEEP CONVOLUTION MODELS
1:) DEEP CONVOLUTION MODELS

Inception Network
1:) DEEP CONVOLUTION MODELS

Reference:

(1) https://towardsdatascience.com/the-w3h-
of-alexnet-vggnet-resnet-and-inception-
7baaaecccc96.

(2) https://cv-tricks.com/cnn/understand-
resnet-alexnet-vgg-inception/

You might also like