SlideShare a Scribd company logo
Convolutional Neural Network Complete
Guide
What is Convolutional Neural Network?
Convolutional Neural Network is an algorithm of Deep Learning. That is
used for Image Recognition and in Natural Language Processing.
Convolutional Neural Network (CNN) takes an image to identify its
features and predict it.
Suppose, when you see some image of Dog, your brain focuses on
certain features of the dog to identify. These features may be dog’s ears,
eyes, or it may be anything else. Based on these features your brain
gives you signal that this is a dog.
Similarly, Convolutional Neural Network processes the image and
identifies it based on certain features. Convolutional Neural Network is
gaining so much popularity over the artificial neural networks. Because it
is used mostly in every field like ​self-driven cars, Image recognition​.
Another application of a convolutional neural network is that on
Facebook​, it easily identifies the face of the person and tags them by
their names.
Yann Lecun​ is the father of the Convolutional Neural Network. He is the
student of ​Geoffrey Hilton​. Geoffrey Hilton is the father of Artificial
Neural Network.
©MLTUT Visit ​https://www.mltut.com/
So let’s see how CNN works-
So, this is the basic structure of the Convolutional Neural Network. This
input image may be anything, CNN takes this image to perform the
operation and then classify it.
©MLTUT Visit ​https://www.mltut.com/
Convolutional Neural Network can be used in ​Sentiment Analysis​. That
means it can detect that a person is ​happy or sad​ based on the feature
of the images.
This is an emoticon just for a reference, but CNN can identify the
emotions of human faces. CNN gives the ​probability​ for example it can
say 90% is the probability that the person is happy.
©MLTUT Visit ​https://www.mltut.com/
How Convolutional Neural Network
Recognizes the Features?
The black and white image is a 2- dimensional array. For Black and
White images, the pixel ranges from​ 0 to 255.​ The 0 pixel is a black pixel
and 255 is the exact white pixel. And between 0 to 255 there are
different variations of grey color. Based on that information, the
computer works. This is the starting point in CNN to work on an image.
A computer doesn’t work on colors, it works on 0 and 1-pixel values.
In the colored image, it is a 3-dimensional array. It has an RGB layer.
RGB means Red, Green, and Blue. Each pixel has different values
assigned to it. And again the computer works on that value to find out
the color of the image.
Let’s take a very simple example so that you can understand easily.
Suppose we have a smiling Face. So to convert it into a pixel form,
consider 0 as white, and 1 as black. The smiling image can be
represented in the pixel format, that looks something like that-
©MLTUT Visit ​https://www.mltut.com/
Now, let’s move to the steps of CNN.
Steps in Convolutional Neural Network-
In Convolutional Neural Network, there are basically following steps-
1. Convolution Operation.
2. ReLU Layer.
3. Pooling.
4. Flattening.
5. Full Connection.
©MLTUT Visit ​https://www.mltut.com/
Convolution Operation-
A Convolution is basically a combining integration of two functions. And
it shows how one function modifies the shape of others. But here I am
not gonna discuss the maths behind it. I will discuss the functionality of
the Convolution layer.
It’s very easy and interesting.
So let’s see what happens in the Convolution Layer.
In the convolution layer, we have a ​feature detector​ or you can say a
Filter.​ This feature detector is a matrix. This matrix may be 3×3 or 5×5.
Here, I am taking a 3×3 matrix. You see mostly a 3×3 matrix.
A ​feature detector​ is also known as ​Kernel​. A feature detector basically
performs a multiplication of input images and generates a ​Feature Map.
You can understand the functionality of convolution with the help of this
image.
©MLTUT Visit ​https://www.mltut.com/
So, here in the image, there is an input image matrix, feature detector,
and feature map. This feature detector that I used here is just for your
reference. It may be anything.
In the convolution layer, multiplication is done between the input image
and the feature detector/filter.
As the filter is a 3×3 matrix, so in the input image choose the top left 3×3
matrix to perform multiplication.
©MLTUT Visit ​https://www.mltut.com/
So, here we take the top-left 3×3 matrix from the input layer, and then
we match values from the feature detector, here nothing is matched,
that’s why I write 0 in a feature map. How many features are matched,
we write that number in the feature map.
©MLTUT Visit ​https://www.mltut.com/
Let’s see how we get 0 in feature map and how matching is done with help
of this image-
Here, in both the matrices, we didn’t get any 1 which is at the same
location in both matrices.
Are you still confused about how we get 0 as a result?
Don’t worry!
©MLTUT Visit ​https://www.mltut.com/
I will explain to you again.
Here, we are trying to find the matching place of 1. When we find 1
which is located at the same place in both matrices, we count it as 1.
Otherwise, we put 0 in a feature map.
I hope now you understand. Let’s see how to perform the same operation with
other matrices.
Here, we got 1 in the feature map, because we found one place where 1
is located at the same place in both matrices.
©MLTUT Visit ​https://www.mltut.com/
Similarly, it happens with all other matrices.
One more important thing to keep in mind is that here, we are using a
single step. That means the gap between the two pixels is one. It may be
two or more.
So after performing the same operation on all pixels, we get our feature
map that looks something like that.
©MLTUT Visit ​https://www.mltut.com/
Here, I have mentioned the pixel, where we got 4 because we got 4
matching places, where 1 is located.
I hope now you understand how multiplication is performed in the
Convolution Layer.
So, now what we have created in the Convolution layer?. It's a Feature
map. By creating a feature map, we reduced the size of our image.
Because our input image is of a 7×7 matrix, but after the convolution
layer, we converted it into a 5×5 matrix.
The main purpose of the convolution layer is to make the image smaller
in size so that we can perform operation faster.
But,
There is one more question, that are we losing the information? So the
answer is- yes, some information we are losing, but the main features of
the image, we have collected. In image all of the features are not
important, some are useless. They can only increase the image size. So
it’s better to remove such features.
The higher the number you get in the feature map, the more important
feature it is. Like in the example image, we got 4. So it shows some
important features of the image.
In CNN multiple feature maps are created for a single image with the
help of different filters. Here, I have shown only one feature map, but it
may be much more in CNN. Therefore, lots of features are collected
from different feature maps.
©MLTUT Visit ​https://www.mltut.com/
Different feature maps are collected, and then at the training time, the
neural network decides, which features are important. We apply different
feature detectors or filters to get different feature maps.
2. ReLU Layer-
This is the additional step in the convolution layer. Here, we apply a
rectifier function. I hope you are familiar with the rectifier function. If not,
then read it from ​here​.
©MLTUT Visit ​https://www.mltut.com/
We apply the rectifier function here because we want to increase the
nonlinearity in our CNN. The reason for increasing the nonlinearity in
CNN because images are highly nonlinear. But when we apply different
functions like convolution, the image may become linear. Therefore, we
want to break the linearity.
There is nothing much to discuss in that Layer. It is a subpart of the
Convolution layer.
Let’s move to the next layer.
3. Pooling-
Suppose CNN has to identify the apple. But all apple images are not the
same. Some have different shapes, some have different colors, so how
CNN can recognize every image of an apple. If CNN looks only at those
features from those it learned previously, it can’t predict the new shape
apple. Therefore we have to make sure that our neural network has a
property called special variance. That means it doesn’t care that features
are a little bit different, still, CNN can recognize that it is an apple. That is
all about Pooling.
Here, I am gonna use Max Pooling. But there are different kinds of
pooling- Min Pooling, Sum Pooling, and many more.
©MLTUT Visit ​https://www.mltut.com/
Now let’s see how to apply Max Pooling-
● We take a box of 2×2 pixels from the feature map. You can
choose a 3×3 pixel of the box. It’s not fixed.
● Start from the top left corner of the feature map.
● As, we are doing max pooling, so we take the max number
from that box and put it into the Pooled Feature Map.
● Then move to the next box with one step and perform the
same operation.
©MLTUT Visit ​https://www.mltut.com/
Now, let’s understand with the help of this image-
Here, we got 1 because the maximum number is 1 in the box of 2×2
pixels.
©MLTUT Visit ​https://www.mltut.com/
Let’s see the next step-
©MLTUT Visit ​https://www.mltut.com/
Step 3-
©MLTUT Visit ​https://www.mltut.com/
Step 4-
Here, we got 4, because the maximum number in that box is 4.
Similarly, you can perform the same operation with the whole feature
map. After performing on full feature map, you get your Pooled feature
map something like that-
©MLTUT Visit ​https://www.mltut.com/
By performing Pooling, we are reducing the size but also preserving the
important features of the image. We are preventing overfitting by
performing pooling. And that is the main advantage of pooling. Because
not all information is important.
So, that’s all about pooling. Now let’s move to the next step.
©MLTUT Visit ​https://www.mltut.com/
4. Flattening-
This is a very simple step. After Pooling, we got out the Pooled Feature
Map. So, in this step, we are going to convert a 3×3 matrix into a single
column.
The reason for doing flattening is because we will provide these values
as input values in the input layer.
Let’s see how it looks after performing flattening-
©MLTUT Visit ​https://www.mltut.com/
So, after flattening, we got pixels values in this form. And these will be
supplied to the input layer.
Now, let’s move to the final step-
5. Full Connection-
In that step, we add our fully convolutional network to the artificial neural
network. All the work which we have done so far, now it's time to pass
these pixel values to the neural network.
I have discussed the artificial neural network in a separate article. If you
are not aware of the artificial neural network and its structure, then first
read this article from here- ​Artificial Neural Network.
So, in an artificial neural network, we have an input layer, a hidden layer,
and output layer, something like that-
©MLTUT Visit ​https://www.mltut.com/
In CNN the hidden layers are called a fully connected layer.
So, now we pass our flattening values to the input layer, and fully
connected layers perform operations and predict the outcome based on
the features.
Let’s understand what operation is performed here-
1. First, we pass input values to the input layer.
2. A fully connected layer performs an operation, and predicts
the output.
©MLTUT Visit ​https://www.mltut.com/
3. Then it checks for the error rate in the output layer with the
help of cost function as we did in artificial neural networks.
4. After that, we backpropagate and adjust the weights, and
again predict the output.
5. Then again the predicted output is matched with actual
output and calculates the error rate.
6. Again backpropagate, update the weights.
7. This process is repeated until ​CNN​ predicts the accurate
result.
So this is all about ​Convolutional Neural Network.
I hope now you understand What is Convolutional Neural Network? and
its steps.
For more details visit- ​https://www.mltut.com/
©MLTUT Visit ​https://www.mltut.com/

More Related Content

DOCX
Tweening and morphing
PPT
Animation
PDF
Motion graphics Terminology
PDF
JonathanWestlake_ComputerVision_Project1
PPTX
Image Stitching for Panorama View
PDF
Review of Digital Image Forgery Detection
PPT
Animation
PPT
Face morphing
Tweening and morphing
Animation
Motion graphics Terminology
JonathanWestlake_ComputerVision_Project1
Image Stitching for Panorama View
Review of Digital Image Forgery Detection
Animation
Face morphing

What's hot (13)

PDF
Image_processing
PPT
Game development terminologies
PPTX
Datt 2501 week 10
PPTX
Datt 2501 week 11
PPSX
Animation techniques for CG students
PDF
Gaming Process
PPTX
Datt 2500 week 10
PPTX
Animations
PDF
Graphics
DOC
Face Morphing Be Project
PPT
3D Modeling and Texturing Walkthrough
PPTX
Chap9 10
Image_processing
Game development terminologies
Datt 2501 week 10
Datt 2501 week 11
Animation techniques for CG students
Gaming Process
Datt 2500 week 10
Animations
Graphics
Face Morphing Be Project
3D Modeling and Texturing Walkthrough
Chap9 10
Ad

Similar to Convolutional neural network complete guide (20)

PDF
Convolutional_neural_network mechanism.pptx.pdf
PDF
Data Science - Part XVII - Deep Learning & Image Processing
PPTX
Deep Computer Vision - 1.pptx
PDF
A graphic library and an application for simple curve manipolation
PPTX
Traffic Automation System
PPTX
Dssg talk CNN intro
DOCX
Designing a neural network architecture for image recognition
PPTX
computervisionanditsapplications-190311134821.pptx
PDF
Real Time Sign Language Recognition Using Deep Learning
PPTX
[Revised] Intro to CNN
DOCX
Lets build a neural network
PDF
Transcript - Data Visualisation - Tools and Techniques
PPTX
cnn ppt.pptx
PPTX
PBL presentation p2.pptx
PDF
BMVA summer school MATLAB programming tutorial
DOCX
Deep Neural Network DNN.docx
DOCX
16 OpenCV Functions to Start your Computer Vision journey.docx
DOCX
Laureate Online Education Internet and Multimedia Technolog.docx
DOCX
Scale invariant feature transform
PPTX
Graphics on the Go
Convolutional_neural_network mechanism.pptx.pdf
Data Science - Part XVII - Deep Learning & Image Processing
Deep Computer Vision - 1.pptx
A graphic library and an application for simple curve manipolation
Traffic Automation System
Dssg talk CNN intro
Designing a neural network architecture for image recognition
computervisionanditsapplications-190311134821.pptx
Real Time Sign Language Recognition Using Deep Learning
[Revised] Intro to CNN
Lets build a neural network
Transcript - Data Visualisation - Tools and Techniques
cnn ppt.pptx
PBL presentation p2.pptx
BMVA summer school MATLAB programming tutorial
Deep Neural Network DNN.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
Laureate Online Education Internet and Multimedia Technolog.docx
Scale invariant feature transform
Graphics on the Go
Ad

Recently uploaded (20)

PDF
Well-logging-methods_new................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
PPT on Performance Review to get promotions
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Geodesy 1.pptx...............................................
PPTX
Sustainable Sites - Green Building Construction
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPT
Project quality management in manufacturing
PPTX
web development for engineering and engineering
PDF
Digital Logic Computer Design lecture notes
DOCX
573137875-Attendance-Management-System-original
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Well-logging-methods_new................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
OOP with Java - Java Introduction (Basics)
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT 4 Total Quality Management .pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPT on Performance Review to get promotions
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
Geodesy 1.pptx...............................................
Sustainable Sites - Green Building Construction
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Project quality management in manufacturing
web development for engineering and engineering
Digital Logic Computer Design lecture notes
573137875-Attendance-Management-System-original
Model Code of Practice - Construction Work - 21102022 .pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Convolutional neural network complete guide

  • 1. Convolutional Neural Network Complete Guide What is Convolutional Neural Network? Convolutional Neural Network is an algorithm of Deep Learning. That is used for Image Recognition and in Natural Language Processing. Convolutional Neural Network (CNN) takes an image to identify its features and predict it. Suppose, when you see some image of Dog, your brain focuses on certain features of the dog to identify. These features may be dog’s ears, eyes, or it may be anything else. Based on these features your brain gives you signal that this is a dog. Similarly, Convolutional Neural Network processes the image and identifies it based on certain features. Convolutional Neural Network is gaining so much popularity over the artificial neural networks. Because it is used mostly in every field like ​self-driven cars, Image recognition​. Another application of a convolutional neural network is that on Facebook​, it easily identifies the face of the person and tags them by their names. Yann Lecun​ is the father of the Convolutional Neural Network. He is the student of ​Geoffrey Hilton​. Geoffrey Hilton is the father of Artificial Neural Network. ©MLTUT Visit ​https://www.mltut.com/
  • 2. So let’s see how CNN works- So, this is the basic structure of the Convolutional Neural Network. This input image may be anything, CNN takes this image to perform the operation and then classify it. ©MLTUT Visit ​https://www.mltut.com/
  • 3. Convolutional Neural Network can be used in ​Sentiment Analysis​. That means it can detect that a person is ​happy or sad​ based on the feature of the images. This is an emoticon just for a reference, but CNN can identify the emotions of human faces. CNN gives the ​probability​ for example it can say 90% is the probability that the person is happy. ©MLTUT Visit ​https://www.mltut.com/
  • 4. How Convolutional Neural Network Recognizes the Features? The black and white image is a 2- dimensional array. For Black and White images, the pixel ranges from​ 0 to 255.​ The 0 pixel is a black pixel and 255 is the exact white pixel. And between 0 to 255 there are different variations of grey color. Based on that information, the computer works. This is the starting point in CNN to work on an image. A computer doesn’t work on colors, it works on 0 and 1-pixel values. In the colored image, it is a 3-dimensional array. It has an RGB layer. RGB means Red, Green, and Blue. Each pixel has different values assigned to it. And again the computer works on that value to find out the color of the image. Let’s take a very simple example so that you can understand easily. Suppose we have a smiling Face. So to convert it into a pixel form, consider 0 as white, and 1 as black. The smiling image can be represented in the pixel format, that looks something like that- ©MLTUT Visit ​https://www.mltut.com/
  • 5. Now, let’s move to the steps of CNN. Steps in Convolutional Neural Network- In Convolutional Neural Network, there are basically following steps- 1. Convolution Operation. 2. ReLU Layer. 3. Pooling. 4. Flattening. 5. Full Connection. ©MLTUT Visit ​https://www.mltut.com/
  • 6. Convolution Operation- A Convolution is basically a combining integration of two functions. And it shows how one function modifies the shape of others. But here I am not gonna discuss the maths behind it. I will discuss the functionality of the Convolution layer. It’s very easy and interesting. So let’s see what happens in the Convolution Layer. In the convolution layer, we have a ​feature detector​ or you can say a Filter.​ This feature detector is a matrix. This matrix may be 3×3 or 5×5. Here, I am taking a 3×3 matrix. You see mostly a 3×3 matrix. A ​feature detector​ is also known as ​Kernel​. A feature detector basically performs a multiplication of input images and generates a ​Feature Map. You can understand the functionality of convolution with the help of this image. ©MLTUT Visit ​https://www.mltut.com/
  • 7. So, here in the image, there is an input image matrix, feature detector, and feature map. This feature detector that I used here is just for your reference. It may be anything. In the convolution layer, multiplication is done between the input image and the feature detector/filter. As the filter is a 3×3 matrix, so in the input image choose the top left 3×3 matrix to perform multiplication. ©MLTUT Visit ​https://www.mltut.com/
  • 8. So, here we take the top-left 3×3 matrix from the input layer, and then we match values from the feature detector, here nothing is matched, that’s why I write 0 in a feature map. How many features are matched, we write that number in the feature map. ©MLTUT Visit ​https://www.mltut.com/
  • 9. Let’s see how we get 0 in feature map and how matching is done with help of this image- Here, in both the matrices, we didn’t get any 1 which is at the same location in both matrices. Are you still confused about how we get 0 as a result? Don’t worry! ©MLTUT Visit ​https://www.mltut.com/
  • 10. I will explain to you again. Here, we are trying to find the matching place of 1. When we find 1 which is located at the same place in both matrices, we count it as 1. Otherwise, we put 0 in a feature map. I hope now you understand. Let’s see how to perform the same operation with other matrices. Here, we got 1 in the feature map, because we found one place where 1 is located at the same place in both matrices. ©MLTUT Visit ​https://www.mltut.com/
  • 11. Similarly, it happens with all other matrices. One more important thing to keep in mind is that here, we are using a single step. That means the gap between the two pixels is one. It may be two or more. So after performing the same operation on all pixels, we get our feature map that looks something like that. ©MLTUT Visit ​https://www.mltut.com/
  • 12. Here, I have mentioned the pixel, where we got 4 because we got 4 matching places, where 1 is located. I hope now you understand how multiplication is performed in the Convolution Layer. So, now what we have created in the Convolution layer?. It's a Feature map. By creating a feature map, we reduced the size of our image. Because our input image is of a 7×7 matrix, but after the convolution layer, we converted it into a 5×5 matrix. The main purpose of the convolution layer is to make the image smaller in size so that we can perform operation faster. But, There is one more question, that are we losing the information? So the answer is- yes, some information we are losing, but the main features of the image, we have collected. In image all of the features are not important, some are useless. They can only increase the image size. So it’s better to remove such features. The higher the number you get in the feature map, the more important feature it is. Like in the example image, we got 4. So it shows some important features of the image. In CNN multiple feature maps are created for a single image with the help of different filters. Here, I have shown only one feature map, but it may be much more in CNN. Therefore, lots of features are collected from different feature maps. ©MLTUT Visit ​https://www.mltut.com/
  • 13. Different feature maps are collected, and then at the training time, the neural network decides, which features are important. We apply different feature detectors or filters to get different feature maps. 2. ReLU Layer- This is the additional step in the convolution layer. Here, we apply a rectifier function. I hope you are familiar with the rectifier function. If not, then read it from ​here​. ©MLTUT Visit ​https://www.mltut.com/
  • 14. We apply the rectifier function here because we want to increase the nonlinearity in our CNN. The reason for increasing the nonlinearity in CNN because images are highly nonlinear. But when we apply different functions like convolution, the image may become linear. Therefore, we want to break the linearity. There is nothing much to discuss in that Layer. It is a subpart of the Convolution layer. Let’s move to the next layer. 3. Pooling- Suppose CNN has to identify the apple. But all apple images are not the same. Some have different shapes, some have different colors, so how CNN can recognize every image of an apple. If CNN looks only at those features from those it learned previously, it can’t predict the new shape apple. Therefore we have to make sure that our neural network has a property called special variance. That means it doesn’t care that features are a little bit different, still, CNN can recognize that it is an apple. That is all about Pooling. Here, I am gonna use Max Pooling. But there are different kinds of pooling- Min Pooling, Sum Pooling, and many more. ©MLTUT Visit ​https://www.mltut.com/
  • 15. Now let’s see how to apply Max Pooling- ● We take a box of 2×2 pixels from the feature map. You can choose a 3×3 pixel of the box. It’s not fixed. ● Start from the top left corner of the feature map. ● As, we are doing max pooling, so we take the max number from that box and put it into the Pooled Feature Map. ● Then move to the next box with one step and perform the same operation. ©MLTUT Visit ​https://www.mltut.com/
  • 16. Now, let’s understand with the help of this image- Here, we got 1 because the maximum number is 1 in the box of 2×2 pixels. ©MLTUT Visit ​https://www.mltut.com/
  • 17. Let’s see the next step- ©MLTUT Visit ​https://www.mltut.com/
  • 18. Step 3- ©MLTUT Visit ​https://www.mltut.com/
  • 19. Step 4- Here, we got 4, because the maximum number in that box is 4. Similarly, you can perform the same operation with the whole feature map. After performing on full feature map, you get your Pooled feature map something like that- ©MLTUT Visit ​https://www.mltut.com/
  • 20. By performing Pooling, we are reducing the size but also preserving the important features of the image. We are preventing overfitting by performing pooling. And that is the main advantage of pooling. Because not all information is important. So, that’s all about pooling. Now let’s move to the next step. ©MLTUT Visit ​https://www.mltut.com/
  • 21. 4. Flattening- This is a very simple step. After Pooling, we got out the Pooled Feature Map. So, in this step, we are going to convert a 3×3 matrix into a single column. The reason for doing flattening is because we will provide these values as input values in the input layer. Let’s see how it looks after performing flattening- ©MLTUT Visit ​https://www.mltut.com/
  • 22. So, after flattening, we got pixels values in this form. And these will be supplied to the input layer. Now, let’s move to the final step- 5. Full Connection- In that step, we add our fully convolutional network to the artificial neural network. All the work which we have done so far, now it's time to pass these pixel values to the neural network. I have discussed the artificial neural network in a separate article. If you are not aware of the artificial neural network and its structure, then first read this article from here- ​Artificial Neural Network. So, in an artificial neural network, we have an input layer, a hidden layer, and output layer, something like that- ©MLTUT Visit ​https://www.mltut.com/
  • 23. In CNN the hidden layers are called a fully connected layer. So, now we pass our flattening values to the input layer, and fully connected layers perform operations and predict the outcome based on the features. Let’s understand what operation is performed here- 1. First, we pass input values to the input layer. 2. A fully connected layer performs an operation, and predicts the output. ©MLTUT Visit ​https://www.mltut.com/
  • 24. 3. Then it checks for the error rate in the output layer with the help of cost function as we did in artificial neural networks. 4. After that, we backpropagate and adjust the weights, and again predict the output. 5. Then again the predicted output is matched with actual output and calculates the error rate. 6. Again backpropagate, update the weights. 7. This process is repeated until ​CNN​ predicts the accurate result. So this is all about ​Convolutional Neural Network. I hope now you understand What is Convolutional Neural Network? and its steps. For more details visit- ​https://www.mltut.com/ ©MLTUT Visit ​https://www.mltut.com/