Learn Convolutional Neural Network for Image Recognition

Analytics Vidhya · Beginner ·🧬 Deep Learning ·3y ago

Key Takeaways

The video covers the fundamentals of Convolutional Neural Networks (CNNs) for image recognition, including the structure of artificial neural networks, activation functions, and the steps to design a deep CNN model. It also provides a hands-on implementation of a CNN model using the Keras API in TensorFlow.

Full Transcript

hello and welcome everyone to another session in the datar series we are really very excited to be here with you this evening for such an adventurous session for learning with interaction I am Shrestha sahu part of the data science team at analytics Vidya and I will be the moderator for this session for those who have just joined us for the very first time a brief introduction about the data sessions the datar is a series of sessions conducted by analytics Vidya led by top industry experts it is it is a very fun way to understand the concepts of data science from the leading players in the datatech domain and the name suggests itself it's one hour totally dedicated to data and the guys who just join us uh please do interact into the poll uh now on to our today's session which is for convolution neural network for image recognition in this session we will be going through the following topics artificial neural networks activation functions convolution neural network steps to design deep convolution neural network model and hence on with CNN model implementation for image recognition and an important note before we kick off things I would like to tell you guys that we are recording the session and we will make the recording available in a few days on our YouTube channel for which you will get the link in the chat section uh in a couple of minutes please use the Q a section for asking any questions you might have during the session and we will do our best to answer them as the data art progresses towards the end and last but not the least we will share a feedback poll towards the end of the session which I request you all to participate in so I'll write uh now on to our speaker in the session of data R we have Dr nitin sale K with us Dr nitin Arvin is an assistant professor professor at the school of computer science engineering and Technology Bennett University greater Noida he has extensive work experience in research teaching corporate training and as a consultant data scientist with multiple organizations in the past he has also received a PhD in computer science and engineering that's a really fascinating profile I guess so uh over to you nitin the virtual stage is all yours yeah thank you hello uh hello I'm audible yeah yeah your audible just a second yeah so good evening all of you uh let me share my screen I hope my screen is visible yes it is okay so uh my name is nitin and the station is based on the Deep convolution neural network or image recognition so these are the outlines that we are going to cover so as we know CNN if you would like to understand the CNN the we should require the basic understanding of artificial neural network terminology is used in the neural network and then after that we are going to discuss the convolution neural network and how to design the CNN model and at the end we will take one Hands-On that will be uh useful for all of you for doing the image recognition so uh let us start with the artificial neural network so what it exactly means the term is artificial neural network is basically inspired from biological neural network that means it is a human brain the purpose of human brain we all of you know that it is useful for solving the problem okay the same kind of thing we want to create it artificially okay we want to mimic the structure of human brain and we want to add some artificial we want to add some intelligence in that and that structure is called as artificial neural network so artificial neural network is in the field of EI where it attempt to mimic the networks of neuron make up a human brain so brain means the state of neurons interconnected with each other okay so that the computer will have an option to understand the thing and make the decision in human-like manner okay so basically the entire purpose of this thing is to solve the problem real world problem okay and we wanted to automatic things okay like we know that we have a limited set of medical practitioner okay so we wanted to replace the medical practitioner by Machine okay or artificial brain that can take the decision means what uh with what BC is the the person is suffered okay so like that so uh as I told you so artificial neural network means it is a kind of uh the copy of human brain okay so these are the the terminologies that we have biological neural network versus artificial neural networks okay so in brain all the neurons are interconnected with each other okay and human brain will take the decision to solve the problem so likewise in artificial neural networks we have input we have nodes we have weight we have output okay the cell nucleus in the brain is replaced by the neuron and likewise some other medical terminologies like dendrites is replaced by inputs snipase is replaced by weight axon is replaced by output the single unit of artificial neural network this is the most important thing [Music] neural network then we first node first we should know the what do we mean by artificial neural network so this is the the basic structure of artificial neural network so if you can find over here this is your neuron okay and these all are the input X1 X2 X3 so on up to x m okay so all this input nodes are connected with the this single node why are some weight okay why are some weight and in this particular node the summation will takes place along with by adding some bias summation means X1 W1 plus x2w2 plus x3w3 so 1 up to x x m w m along with some bias okay then after that every node is having some activation function okay so activation function is another terminology that we will discuss so activation function basically activates the neuron okay whether the output you need to fire or not based on certain conditions okay so there are different activation functions that we require and finally you get the output okay that is called as predicted output this is called as predicted output actual output is different Okay so so actual output is say suppose you are predicting the salary of course customer based on some parameter like age and year of experience okay so this will become your age and this will become your a year of experience okay these two columns these two features and you are predicting the salary of person okay and your model is predicting the salary as 90k okay your model is predicting the salary as 90k but the actual salary is of 1 lakh okay so the difference over here it is of 10 000 okay so that difference is nothing but the error that difference is nothing but the error and we want to minimize this error we wanted to minimize this error okay so this is basically uh the single artificial neural network model or you can say the simple perceptron model so the structure of deep neural network is like this where we have a input layer set of hidden layers and output layers okay and all these layers are interconnected with each other you can see over here it is a completely connected neural network completely connected means what this is your layer 1 which is input layer this is your hidden layer one hidden layer 2 and output layer so you can find it over here that in every layer we have the node set of nodes and the nodes from each layer is connected with the other layer nodes okay and each node is connected with every other node so that's why this is called as fully connected neural network okay so deep neural network means sometimes we can call it as a deep learning modeler so deep learning means or deep neural network means what there we have a more than one hidden layer input layer set of hidden layer and output layer this is a structure of deep neural network and in every layer we have nodes the terminologies that we used under the neural networks are the layers activation functions and weight as we discussed the layer we know that the layers we have three layers input layer hidden layer and output layer in every layer you can find the different nodes how it is different from the human brain in human brain there is no such a thing like layer okay there are set of neuron corrosive neurons are there in our human brain okay and all these neurons are interconnected with each other this is basically a human brain state of neurons that are interconnected with each other but in artificial neural network the structure is something different okay we basically it is a it is a mimic or it is a copy of human brain okay but something some different some kind of differentiation should be there by adding the layers so you can find one layer okay in one layer there are nodes you have the options that how many nodes that you want to add okay so this is your input layer then state of hidden layer okay so one hidden layer so hidden layer one hidden layer 2 can add as many as written here and add the nodes over there right finally the output layer okay so input layers hidden layer and output layer these three layer you can find it into the neural network okay all these nodes are interconnected with each other okay so that is what we have already discussed now the weights as I told you that the nodes are interconnected with other nodes wires on weight the importance of that weight is to reduce the loss loss or the error so weight are the numeric value that are multiplied by the input and wire back propagation in that they are modified to reduce the loss so one example I have explained initially that your model is predicting the salary as 90 000 okay but actual salary is of 100 000 okay and there is a error or there is loss of ten thousand okay and that loss that that error can be propagated in the neural model okay and the weight weight is going to be adjusted okay by by some optimization algorithm like atom Optimizer RMS prop okay so there are SGD okay there are different set of optimization algorithms that are available in order to update the weights okay and by updating these weights by updating this weights neural model can reduce the error okay this is was the what the purpose of bit okay the weight factor is very very important okay one more time I'm explaining this thing you can observe here inputs are connected with other nodes okay why are some weight so you can find here each input is multiplied by weight 1 x 1 W 1 plus x 2 W 2 plus x 3 W 3 plus xmwm okay so this weight we are talking now next activation function so name itself indicate we are discussing the terminologies the first terminology that we have discussed it is a layer okay then after that we have discussed the weight now we are discussing the activation function activation function name itself indicate it is the kind of a door okay like activating the neuron okay so it is a mathematical formula that helps the neuron to switch on or off duration function decide whether a neuron should be activated or not okay whether you want to fire the neuron or not by calculating rated sum and further adding bias with it okay so if you see this deep neural model on every node you can find at every node so you can find there is activation functions okay so that will basically useful for activating the neuron means what whether you want to fire some data through this node or through this node or through this node okay so activation functions we will add it into the different layer input layer hidden layer and output layer okay so different activation function we use it for input layer hidden layer and output okay so basically it is used for forwarding the output sometime this node is not get fired sometimes this will not get fired okay only this will say suppose this node is not fired only this so kind of Direction I will show you okay like this and basically this path will gives us some output final output now so there are some activation function that we have the most popular activation functions that we have the linear activation function stick mode activation function sometime we called it as a logistic activation function relu activation function that we called as a rectified linear unit and the final one is a soft Max activation function okay so these all are the most popular activation function now I'm not going into the detail of mathematics as we have a limited time so right now those who don't know what activation function is to use and if if they don't know the mathematics the simple term rule is that simple thumb rule is that you can use the linear activation function and reload activation function so basically the simple linear is nowadays not useful okay these three are useful so you can use the relay activation function in the output layer okay output layer and so not output layer sorry function in input layer and hidden layer okay and sigmoid activation function and softmax activation function in output layer okay so you can use sigmoid or softmax activation function in the output layer so when your problem is a multi-class classification problem then you can go for softmax Activation function when your problem is a binary class classification problem then you can go for sigmoid activation function okay binary classification means what say suppose I am having one data set and in that data set I am having on the cat and dog images and we wanted to predict the whether the image is chat or whether the image is dark that problem is binary class classification okay so if it is the case then in our output then in our in our output layer we add activation function as a sigmoid activation function okay now let's take one example for multi-class classification multi-class classification means what say suppose I am having one data set on which we are going to perform the implementation CR cifar data set there we have the 10 class of images 10 class of images okay then that 10th class okay if it is a 10 class okay then in the output layer we need to add softmax activation function so simple thumb rule is that use sigmoid and soft Max in the output layer if it is binary classification go with sigmoid if it is multi-class classification go with softmax that's it and other than output layer other than output here without any hesitation go with reload activation function okay so that is the thumb rule now the types of neural network that we have apart from that there are several other neural network models okay so the very basic model it is a perceptron model then we have feed forward artificial neural network or you can say a multi-layer perceptron model then convolution neural network on which our session is based okay today we are going to discuss this convolutionary neural network we have radial basic functional neural network we have recurrent neural network we have long short term memory Network that is called as lstm we have bilestium we have Pi Gru Gru sequence models okay many other but to all these neural networks you should know this basic terminology which we have covered like we covered the layers we covered activation function we discussed the use of weight okay so I hope up till now it is clear now we are going to start with the convolution neural network so convolutional neural network is a type of artificial neural network and it is basically used for handling the image related projects video related projects so it is used in the image recognition and processing which is specifically with the specific which is specially designed for processing the data so data that is nothing in the form of pixel so you should also know about the image also when we when we will talk about the convolution neural network okay the the main purpose of convolution neural network is to handle the image processing computer vision related projects okay so whenever we talked about the image computer cannot understand the plane image every image is represented in the form of Matrix okay let me show you that thing how it is so you know this is Apple but computer not going to understand this is Apple computer can only understand the metric structure okay and this image is represented in the form of number like 101 10 150 30 okay so in the in the Matrix we have the pixel intensities value okay pixel intensity so the image it is in the between 0 to 255 okay pixel intensity values and that pixel intensity value is formulated in the Matrix okay for example your image is of 32 by 32 okay then 32 by 32 Matrix 32 rows and 32 column and in each particular cell you can find you will have the intensity value so computer can only understand the data in the form of Matrix computer cannot understand this image Okay computer can only understand numbers okay that is one thing that you should know so in CNN each input image will pass through the sequence of convolution layer along with the pooling with flattening and fully connected layer okay so again here is also the thing that we have the input layer we have a set of hidden layer and the output layer but along with that in the hidden layer in the hidden layer we have some other layers like convolution layer Max cooling layer flattening layer okay so that we will discuss in detail so with this diagram also you can find it over here this is the kind of image recognition project where we have a data okay and this is a classified image okay so this image is as an input to the model and your model is going to be predict to which category it's all okay so that image is taken from the camera certain pre-processing operation has done okay so these are the basic steps The Collection data collection then do some pre-processing okay so there is a life cycle okay that also we will discuss okay when we go for the implementation part I will show you what are the generalized steps that is to be required now steps to design the CNN model okay so how can how can we design the CNN model as I explained the neural model contained the three things uh the layers okay the input layer then hidden layer state of hidden layers and output layer so now here it is as a part of hidden layer okay we will add this layers like convolution layer we are going to add first then we are going to add Max cooling layer then the flattening layer we are going to add and then finally the fully connection full connection means your en model okay so the these are the four steps that we need to add while creating the CNN model so convolution or a layer the so the step one is a convolution so convolution it is kind of uh the multiplication operation okay so but with some different way so convolution layer is the first layer to extract the valuable features from an input image okay so the the purpose of this layer is to extract the important feature so if you if you go with the basic k n model okay if you go with the basic a n model then it will be very computationally expensive because in a n model we give complete image to your model okay and your model is processed on complete image okay but that is not the requirement that is not the requirement means what we need some basic information important information okay so feature extraction is one of the important tasking AI okay on the extracted feature valuable extracted feature we are going to train the model okay and that is the first task of the convolution layer so convolution layer has a several filters that perform the convolution operator convolution operations several different uh filters are there it is a mathematical operations which takes two input such as image Matrix okay as I told you image is represented in the form of Matrix and there is a kernel or filter okay let me show you what it what about it exactly so basically if this is my image okay image is of size this is height of the image this is width of the image and this is the depth Okay so and this is a filter okay so multiplication convolution is done by image multiplied by our image convoluted by filter and you get the convoluted feature map connolluted feature map means it is a extracted valuable feature okay and you can see over here your size of the image is get reduced okay as I told you it is computationally expensive if you give the image as it is okay and that will be very very expensive okay lot many iterations will takes place whenever we go for training the Deep learning model so we want to reduce the dimension also okay so if you can find it over here this is my input image of size 8 1 2 3 4 5 6 7 okay so the size of this it is seven by seven okay say one by seven input image and this is uh the sample filter okay and the convolution is done okay convolution is done like this okay so where there is a one okay you need to multiply the convolution Okay so you can find over here 0 multiplied by 0 okay 0 multiplied by zero so there is no match that's why we have 0 at this place okay then let me go for other one now you can see over here 0 0 then this zero with Z 0 this 0 with 1 okay 0 now you can find here 1 multiplied by 1 okay 1 multiplied by 1 it is one so that's why you can find over one over here okay if say suppose here also there is a one and here also there is a one then you can find the two over here okay similarly if you have one over here one over here then this value become 4 okay this is a kind of convolution I hope it is clear so after that after doing the convolution you can find the size of the image is now get reduced to the five by five this is the size of three by three okay size of filter now this is my reduced image and this is kind of valuable information okay valuable extracted features that we have okay and we get several such features okay you can find over here by by doing the convolution with different filters okay so different filters some filters related with the uh the contrast some filter related the age some filter is related with the brightness okay so there are a lot many filters available okay and you get the state of feature map okay so basically the purpose of this convolution is to extract the valuable features and reduce the dimension of the image okay so this is the convolution operation then second step is the max pooling Max pooling is the Second Step okay the max pooling layer we need to add so this layer is also important in pre-processing of the image so the main purpose of this Max pooling layer is to reduce the dimension without losing the important features or pattern okay so you can find it over here so max pooling layer basically interested in the fixed uh the the specific part okay and with the help of this Max pooling layer we can reduce the image dimensionally okay let me show you how it get reduced so for example I am having this Matrix okay Matrix means your image now you know that this is your four by four image okay now if I am going to use the max pooling okay if I'm I'm going with the max filter okay so this is One Max filter okay so now you can answer the Mac if if we pass this image if we pass this image through Max pooling then it will like this so basically two by two if if we are going with the two by two Max pool filter then it will choose the the maximum element the maximum element among this two by two Matrix is 20 then maximum element from this it is 30 so we'll add 30 the maximum element from this it is one one two okay maximum element from this it is 372 or sorry it is 37 Okay so so this is your reduced image okay so four by four image is now get converted into the two by two so the purpose of Max pooling is to reduce the dimension without losing the important feature so initially if you can say uh if your image is of seven by seven okay then after that it will get reduced to the five by five so if you pass it through the P Max pooling then it's it may be reduced with the two byte also okay so that is how the the creatures is get reduced okay Dimension is reduced okay so you can find it over here also so now this is your input image convolution stage so convolution stage again you get the convoluted feature map with reduced Dimension then in Max pooling layer you again get the reduced feature map okay this image is also get reduced because of the max volume here now the final one sorry not final one the step third that is flattening layer flattening layer means it is basically create the vector form of the Matrix okay so for example if it is the featured pool map one of the featured pool map it is one Matrix okay so with flattening we convert this Matrix into the one vector okay so you can find here one one zero one one zero then four two one four two one then zero two one zero to one okay so this is my latent Vector so each so there are lot many old feature map there are lot many feature maps and this each this each pattern will become your node now in the next step so you can find here so there are pulling there are not many cool feature map okay and after going through the flattening layer okay you will get one vector and this one vector become this one vector become your uh one node okay and that we will give it to the your a n that is fully connected neural network model okay so next state piece uh this is the flattening structure okay input image convolution layer pooling layer after flattening after flattening every Matrix okay every feature Matrix one more time I'm explaining after the pulling layer say Suppose there is one two three four five six zero two one okay this is my Matrix three by three so this will become this will become your one vector where we are one two three four five six and six to one like this from one complete Vector in one node okay this will become your node or artificial neural network then the fully connection okay this is a full connection so full connection layer that is your last known as a dense layer in which the result of convolution are fed through a one or more neural layer to generate the final prediction okay so now after flattening the data is going with the fully connected neural model OKAY in fully connected neural model you can see over here input layer then you are a hidden layer and output layer so now this is a kind of full correction so let me directly show you the the overall summarization so in overall summarization of the CNN steps you can find over here input image is get passed through the convolution layer okay you will get the convoluted feature map then it passed through the pooling layer you will get the pulled feature map then the flattening is performed flattening means the pulled feature map converted into the vector and that gives give it to the fully connected neural model okay this is our fully connected Google model and from here you will get the prediction okay so like which one it is for example if it is a dog image okay so at the final node you are getting dog is equal to 0.95 and cat is equal to 0.05 that means 95 percent okay so 95 means you can say the my model is predicting that this image is related to the dog okay then second case if it is a cat image you can see over here the dog is having the the percentage 21 and cat is having the percentage of 79 and your model can predict that this image is a cat image okay so this is a overall summarization okay I hope this is clear so to implement the CNN you need to add convolution layer you need to add pooling layer you need to add platening layer and then finally dance layer okay dense layer means it is a fully connected neural model okay now we are going for the implementation part okay so so the case study that we are considering over here uh we are going for we are creating one model convolution neural network model for image recognition and we have one data set that data set is nothing but the cifer okay so that basically a Canadian Institute and the related data set okay that that is uh created by the Canadian Institute okay so cifer data set includes UH 60 000 images okay of size 32 by 32 okay all our color images 32 by 32 means the 32 you can say the The Matrix size become 32 rows and 38 columns in 10 classes okay in 10 classes with 6000 image per class okay there are 50 000 training images and 10 000 test images in the official data and the label of the classes are include airplane automobile image bird cat beer dog prop Force trip and Drug so this is what this is how it looks so in our data set we have these things airplanes okay all the images okay six thousand 6K okay so total there are 10 categories so total 60 000 images are there so whenever you need to whenever you want to work with the image related case studies or video related case study okay and you want to create the Deep learning model then you need a data set okay and that data contains lot many images it is not the case that you are creating the model with 100 images okay so that model is not of any use until and unless you have the huge amount of data you cannot go for the model creation okay so you need as much as data okay although there are some ways okay say suppose you are having 10 000 images okay although we are having a um like you can go with the augmentation data augmentation approach with data augmentation you can increase the size of your images okay by rotating okay so for 10 000 images you can go with the 40 000 also by applying the data augmentation okay applying the data augmentation means you can rotate the image okay you can blur some image perform some operation and create the uh the image on your own okay so this is our data set on which we are going for creating the CNN model okay no let me show you the how to download the data set okay so this is the page where you will get all the information about the data set okay so all information about the data set you can get it from this link okay now for this case study what we are going uh so for this case study so we are following these things so this if it is my input image we we will go for adding the convolution layer first then pulling layer okay it is up to you how many convolutional layer and how many pooling layer that you want to add so when we say the Deep convolution there deep convolution neural network t means what we are adding more than one convolution layer and cooling layer so uh I'm going to add the another convolution layer and another pulling layer okay so that means this is a pair of convolution layer and pulling layer another pair of convolution layer and pulling layer you can add as meaning it is based on your uh problem statement okay how much accuracy that you want and what system do you have okay if you are having a good system that is having good GPU and all then you can add some more convolutional layer and pulling layer okay by adding this your model is get trained properly then flattening layer and it is a dense layer and finally we get the output okay so these are basic these steps so let me show you so first is the input then we are going for adding the convolution layer cooling layer then flattening layer then output layer or dense layer okay so you can add convolution layer and pulling layer it is up to you how many that you want convolution layer one pooling layer one then conversation layer 2 and pooling layer okay so final structure become like this when we Implement our model now these are the steps okay these are the generalized steps that are involved in any implementation that is related with the a artificial intelligence and deep learning or machine learning project the very first step is identify the problem okay as I told you why we are discussing this neural network deep learning and all the purpose is to solve the problem real world problem so now we have identified that I want to recognize the image okay that is what my problem statement your problem statement may be different okay if someone is working with some dot CSV data set Excel file data set numerical value they may go for the medical related problem medical related problem means hard disk prediction breast cancer prediction okay diabetic prediction so there are different set of problems in the real world okay so almost in every industry you can find the use of this AI like uh medical then your uh Pharma then manufacturing e-commerce agriculture weather forecasting if you can take any name where you can feed the artificial intelligence and we want to make the automated model that can solve the problem so identification of the problem is the first stage sorry based on the identified problem we go for collecting the data say suppose we have identified that I want to go with the image recognition so I will go for collecting the image related data say someone is working with the hard disease related problem they go for collecting the hard disease related data by visiting the hospital by collecting the data from the hospital by visiting the University website okay there are different ways you can go with the Google data set search engine to collect the data so data collection different sources by different sources you can create the data so if it is the image related thing okay then you can create your own data set also okay you can create your own data set and store it in your system that is also the way then whenever then third step is data pre-processing data pre-processing you know that whenever we collect the data from The Real World that data is not a clean data okay so you need to clean that data you need to pre-process that data you need to convert the raw data to the clean data and there are many things like the image may contain the Noise Okay image is not in the proper format if it is a CSV related data then there there will be a missing value there will be a categorical data there will be a redundant data duplication duplication is there so lot many stages are involved again feature scaling is also one of the important thing that we need scaled everything into one single scale okay so this is the part of pre-processing okay so pre-processing is one of the important stages in the any implementation then we go for selecting the Deep learning algorithm okay selecting the Deep learning algorithm as per our need someone may use the a n someone go with the CNN someone go with the lstm RNN that is based on the problem statement okay if it is a problem that is related with the sentiment analysis from the text okay then problem identification data collection pre-processing okay then selecting the Deep learning algorithm means it is lstm or rnf if it is image related like in our case it is then we are selecting the CNN or we can go with some Advanced algorithm also that is based on the CNN vgg 16 which is in 19 resonate then Google net Alex nade okay all Inception okay there are a lot many transfer learning models also and all these models are based on the convolution Network so selecting the Deep learning algorithm is the fourth stage after selecting we go for training the model we train the model on training data set okay and then we go for testing the model once the model is ready okay let me show you say suppose this is my CNN model OKAY CNN model means there are many layers convolution layer pooling layer fattening layer and fully connected and all these are interconnected okay so we give the data training data training data to this and your model is going to be trained like this learning the things learning the things once it get ready okay once you get trained then we go for testing testing means we give some image okay we will give some airplane image to this model and we'll test it whether my model is giving the correct output or not I am giving the airplane image and my model is also giving that it is a airplane okay so like this is the kind of testing okay we are testing it evaluate the performance okay so evaluate the performance we have certain Matrix accuracy precision recalls okay by this we can evaluate the performance performance means what for example I'm giving the airplane image and uh the model is uh going to be recognized as a cat okay so airplane is my input and cat is my output okay that means my model is not working properly it is not trained properly okay so my performance is not good okay so that's why we need to evaluate the we need to evaluate the performance also Okay so after that okay once we get to know that my model is performing fine okay I'm passing airplane image and getting airplane image passing cat image hitting the cat as output okay that means I'm getting the good performance then the final step is the deployment that you can use this model in the real world now okay because the performance is good okay so these are the eight stages that are involving any implementation problem identification identified the problem based on the identified problem go for the data collection perform the data pre-processing select the Deep learning model train the model test the model evaluate the performance and deploy that okay now next now to build the CNN model we will go with this we first Define the network okay this is important because now we are going for the implementation so when we go for creating this model we first Define the network we will add the different set of layers convolution layer Max pooling layer flattening layer dance layer and then we compile the network compiler Define the network means adding the layer along with the nodes okay along with the nodes how much how many nodes that we want in one single layer and compile the network means connect with all connect all and then go for fit the network fit the network means train the model then evaluate the performance by testing it and go for the prediction okay this is how we can go okay now let's go for the implementation part so to implement this I am going to use the Google app Okay Google collab is the online platform that you can use to work with the Deep learning machine learning related things okay so it is online platform so automatically it get opened with your uh Gmail ID Google ID Okay so I'm going to create the new notebook I hope most of you are aware about this thing okay it is a kind of jupyter notebook structure those who are having a good system okay they can use the offline platform also via Anaconda okay and go with the Jupiter notebook okay now so this is our CNN then then 2022 now the very first thing that we need to import the library okay so I'm going to import the necessary Library so as we are dealing with the images so you need matplotlib library matplotlib is the library that is related with the data visualization so that's why I need this one matplotlib dot pipelot as PLT this is the first Library then I need tensorflow okay tensorflow it's basically it is a heart of deep learning okay so tensorflow Kera spy torch okay these are the Deep learning related libraries okay and I'm going with the tensorflow and Keras so from tensorflow dot Keras I'm going to import the data set okay so the data set that I'm talking it right now the data set is already available in our tensorflow library okay so that's why I'm importing the tensorflow.m and importing the data set okay and we are going to take the use of cifar data set where we have the 10 categories of the images okay that we have already discussed with you airplane auto mobile board CAD DL docs so on so on so on okay so it is loading the next is download the data set okay so to download the data set uh you need to store this data set into the the splitted manner okay the splitting so here directly I am going for the splitting because you need to divide the data set into the train and test train pass part is used for creating the model test part is used for testing the model okay so I'm writing here train comma so you can write here the train images comma train label okay green IMG green underscore label comma second cutting uh second dividation test images comma test label equal to data sets Dot piafer this is our data set okay you'll get the hint also there are two cifr 10 I'm going with this and load data is the method okay load data and enter so it will take some time to download the data set 21 30 11 seconds 9 seconds 7 second are you four three two zero okay done downloading so directly we have taken the data State and we have divided the data set into the four part train image train label test image test label okay all these are the label data set label data set means it is a supervised learning problem okay so um now let us go for uh normalizing the image first okay so I'm going with the normalization okay that that comes under the data preprocessing I'm going to normalize the pixel value normalization or pixel value in the range of 0 to 1. okay so right now the pixel intensities is in between 0 to 255 some value is 0 some value is 1 some value is 10 some value is 233 I'm going to normalize everything into 0 to 1 okay so let me copy this equal to okay green image divided by 255 comma test image [Music] let me take the test test image okay so test image and divided by 255.0 and execute okay so this is the normalized let me show you the 10 images 10 image class okay so the class name I'm going to create one list let me copy it from here okay [Music] foreign list of all the categories and pasting it over here okay so these are the class name and then setting the PLT dot figure and Peak size is 15 comma [Music] then for I in range so I want to show you the first 10 image of this data set okay so that's why I'm passing the train over here and in subplot I am going to show you plt.xdink thank you PLT dot I am sure and in that there is a train image in bracket I PRT dot X label foreign in bracket green underscore label [Music] and PLT dot show Mac has no attribute figure so let me check it is bigger it is label okay so these are the the first 10 images from beer okay in the data set from the data set okay now I'm going for initializing the CNN model now initializing or creating the CNN model so to create the CNN model the very first thing you have to import the sequential class so Keras dot model we need to import sequential this is the name of the class I'm going to create the object and this is our model and in the model we are going to add the different layer okay so this is okay let me check models so we have initialized the a n model okay so this is the initialization of the situation of model okay then in this model we are going to add the different layer okay so one by one I am going to add the different layer okay as we have the time constraint so let me open the existing collab file okay so that we can proceed faster Okay so let me open it now I am going to copy one by one by one I'm I'm adding the layer okay so after initializing the CNN model then I am going to create the convolution layer so let me copy this okay so convolution layer the step one which we have discussed okay you need to add the you need to add let me change the the object okay so this is classifier is my object now okay you can take any any name now this is the first layer which I am adding by the help of dot add classifier dot add convolution 2D 32 neurons I am adding okay 32 the size of the filter is three by three then input shape okay the size of the image is 32 comma 32 and 3 okay if you can check you can check the size of the image it is a color image having a size 32 cross 32 cross 3 activation function is reload which I have already explained that if it is other than output layer then every time we go with the activation function as reload this is my first layer convolution layer okay now let me add another layer so pooling layer I am adding now okay so pooling layer is the step two okay classify dot add the name of the layer is Max pulling and I'm specifying the pulling size the pulling size is 2 cross 2 okay and execute it so with which we have added the pooling layer okay as I told you I am going with adding the second convolution layer and second pulling layer okay so I'm adding the second convolution layer and second pulling layer okay so this is my another convolution layer and another Max pooling layer so in convolution 2D layer you can find over here 32 and the number of input nodes size of the filter it is three by three activation function as relu okay so this is our structure that we are following okay let me show you one more time okay convolution layer we have added cooling layer we have added again convolution layer we have added again pulling layer we have added okay now it is the turn to add the flattening layer okay so let me add the flattening layer so I'm copying it from here [Music] flattening layer okay copying it and testing it okay and exhale okay so this is my third step adding the flattening layer now the next step is create the full connection okay so full connection means it is a dense layer so let me copy the dance layer code or cool connection code so to add this I'm going to add full connection over here now you can see over here the first layer that I'm adding having activation function relu and this is our final final layer now you can observe activation function I have specified over here as a stopped Max and number of unit in the output layer I have specified as 10 why 10 because there are 10 categories okay that's why 10 nodes we have specified activation function I have used it is soft Max only because that it is a multi-class classification problem okay other than that we have used the relu activation function you can see over here everywhere we have used the reloop okay I hope this part is clear now this is your cool connection okay now this is your full connection now next is your summary of the model okay let me show you the summary okay this is very interesting in research paper in mini article you can find this thing the the summary okay these many layers are there in my uh CNN model so you can see over here in my model there are convolution layer Max pooling layer again convolution layer again Max cooling layer flatten layer dance layer and final output layer okay so this is the structure that we have followed okay in our implementation you can add as many as layer as per your need okay you can add n number of you can do n number of changes okay so here I have used basically what we have used over here this is your convolution layer Max pooling layer okay the same structure over here convolution Max pooling this is our flattening layer which is our step three dense layer okay so in dense layer this is a normal hidden layer and this dense layer is our output layer okay so this is the summary also you can print the diagrammatic representation also so let me show you how to represent the diagrammatic representation Keras Dot utils dot VIs underscore UD imported plot underscore model and then create the object of plot underscore model pass the classifier this classify all passing and write the two underscore file and our model CNN model dot PNG okay here are not utils execute now you can check see over here this is what the CNN model that we have now convolution layer we have okay Max pooling layer convolution layer Max pooling layer flatten layer dance layer okay so this is my deep convolution neural network okay where we have added the two convolution layer two Max pooling layer one flattening layer one dance layer one output dense layer okay so with this line of code you can print the structure of your model OKAY diagrammatic representation of the model now next is you can go for compilation of the model okay now you need to compile the model compile the model so we don't have the time to write the code that's why I'm popping it from over here so compile the model so let me copy this code add place it over here so here we are using the optimizer as Adam okay there are different optimizers RMS Pro then you can use the SGD okay it is for adjusting the weight then the loss is equal to categorical cross entropy okay if it is uh multi-class classification problem and Matrix that we are considering it is as accuracy so basic become the role of compilation over here it got just to connect all the layers with each other right now we have added the layers you can see there are lot many layers that we have but these layers are not connected okay there are many layers in our model but these layers are not connected with each other okay so no so to connect this we use the compile word compile means connect all the layers with other layers by adding the weight and everything to create the dense model okay so this is called as compilation I hope compilation is clear now let me execute this compile the model okay after compiling the model we go for the model training okay so model training I am going to use the dot fit method to train the model where we can add the epoch okay so it will take the time okay so if you want to train the good model you can increase the e-ports 10 means the 10 iteration approach 100 means 100 iteration okay so basically in every iteration the model gate learn the things like our human brain is also like this okay when we go for the some exam we read something one time two times three times when we read it for 10 times then it will get remembered by your brain okay the same thing is happen in the neural model also okay train image okay let me change the IMG okay IMG paste labels okay let me check the name in our case the variable names are different that's why we are getting the error uh in our case uh test l a b l e s l a b l e s l a b l e s okay now it will take some time okay so this is how the approach is okay so in every approach you will get some loss accuracy now I will show you this in the other Jupiter notebook because we don't have the time to train the model so already I have trained that model so you can see over here accuracy is get increased in the iteration so in the first iteration you can find this 45 accuracy then it will get increased in every iteration okay so you can try with 100 coaches okay and you'll get the good accuracy okay more than 85 also okay so after training the model our next step is to uh check the performance by plotting the graph okay so this is a plot where accuracy versus Epoch is you you can see over here approach increases accuracy is also increases okay approach increases accuracy is approach means the iteration then finally we get to know that my model is working fine I am getting the more than 75 accuracy 85 accuracy then you can go for testing the model okay so here is the code to test the model and to test the uh to go for the prediction okay after evaluating the performance we are going for the prediction so here we are passing one image okay and our model is predicting that this image is related with the automobile similarly again we are passing the images okay state of images and my model is going to predict the which image it is okay so now my model is ready you can pass any image you can download the image from uh the Google scaled down to the 32 by 32 and give it to your model your model is now capable that whether that image is related with the uh the airplane or whether that image is related with the automobile bird can dog deer anything okay so this is the thing from my side okay this is how we have implemented the CNN model I hope it is clear so any questions anything so CNN model implementation is done over here and it also for participants I hope everything is clear okay let me explain one more time because import the library go for data set then normalize the pixel value in the range of 0 to 1 then this is how you can display the first 10 images of your data set then go for initializing the a n model add the convolution layer add the pulling layer another set of convolution layer and pulling layer flattening layer pulley connection layer okay after that you can check the summary then you can print The diagrammatic View of your model okay but this model is not a compiled model okay that step is very very important compilation compilation means connecting all the layer with other layer okay Optimizer loss Matrix we are going to add it okay Adam Optimizer is basically use it for weight okay that way we are talking that way it is get updated in the neural model okay to reduce the loss and that thing is taken care by this atom okay then HP okay so this is what my fitting dot with the dot fit method you can dream the model on training data set okay this is the evaluate this is for evaluating the performance and for the finally prediction now you can go for the deployment okay so in this way uh we have completed with this CNN convolution neural network I hope it is clear as I know not many things are there with one hour it is not possible to explain everything but I tried my best to explain everything okay yes any questions uh yeah we do have queries in Q a section but considering the time you can like answer them in a quick Jiffy oh that would be great okay and uh along with that uh users are being like have asked for the PPT and yes and the code you wrote definitely we will share the BBT okay I will share the PPT and the code okay whatever I'm having along with that data set also don't worry about that part okay so most of the questions are related with this yes we will share it yes can we use the one convolution 2D layer yes you can use one convolution layer and one pooling layer it is up to you okay you can use two convolution layer three convolution layer also okay so the the that is basically related with how deep you want to make your model okay then reload functions move from 0 to any number we are extracting the important features so negative numbers are not valuable thus they are not tuned to zero when passed through the relu activation and any positive number remain in that okay so basically uh reload functions that is a functionality of reload so here it is we are extracting the important features okay and most of the features are not negative in that case okay when we are talking in the images uh slightly we have one thing that is related with the Leaky relu okay if something goes beyond the zero something beyond the zero you can go with the Leaky reloop okay but relo is also best okay hmm we why we didn't use the reloading output layer that's what I explained in in the initial itself okay that reload is basically for the the other than output layer because we don't get the output in the appropriate format for example if you know the sigmoid activation function let me show you if you know the sigmoid activation function okay so sigmoid is one activation function it is a yes shape activation function okay it is a ear shape activation function like this and the value that we get is in the range of 0 to 1. so if your model is predicting the value here certain threshold of 0.5 is fixed if the value is goes uh Beyond 0.5 then it will be categorized as 0 okay so that's why it is useful for the binary classification if it is above 0.5 then it will be categorized as one okay so this is for the uh binary classification okay so uh binary classification you we go with this whereas in multi-class classification we go with the the soft Max activation function okay and reload is having the graph like this okay this is the graph or leaky reload which I talked about the negative number it will be goes like this okay I think most of the questions [Music] yes your load uh YOLO in the next date hour yes YOLO is also one model that is a transfer learning model yes [Music] do we have time to answer other questions oh yeah if you are okay with that but we can be like in a quick Jiffy you know yes so when talking about the weights don't we have the backward propagation yes we have the backward propagation inbuilt when we are going for this implementation okay we have the one line of code to compile the model but internally they are using the backward propagation backward propagation means uh it will back propagate the error okay the error is back propagated in your neural network okay and based on that error your weight is going to be updated okay weight is going to be updated and that error is get reduced okay and that is the purpose of atom optimizer okay so this is related with the backward propagation yeah validation that is validation means it is some part of our train data set that we are going for the the validation testing means the the one separate part that we are creating okay so you can create the three parts training validation and testing yeah same questions first dance layer foreign sigmoid and soft Max I think already I have explained sigmoid softmax are useful uh in the output layer okay and reload activation function is useful in the other than output layer okay so that for that we need to go in some mathematical terms or the graphs and Mathematics behind this okay somewhere down the line I have explained the sigmoid curve okay the sigmoid equation is also there p is equal to 1 upon 1 plus e raised to the power minus X okay so this is the equation of the that sigmoid curve activation function must be same within a single layer but cannot be different across the different layer So based on your model okay if you are adding one hidden layer okay uh then go with reload if you are adding another hidden layer then also you go with the uh the review activation function so it is not the case that you cannot go with the different activation function in the uh in the different layer okay so different layers you can add the different activation function I think most of the questions are covered okay yes so here is something and some note is given by David the Vanishing gradient problem okay so again these are some problems okay in depth we need some time okay so in single lecture it is not possible to cover all this thing okay what is gradient problem Vanishing gradient problem and how we can use it okay so if you want to use it you can go for the leaking okay here is mentioned leaky reload yes I think then from my side so uh all right uh thanks thanks a lot nitin uh on behalf of analytics with there I would like to thank you for your time and for delivering such a wonderful session and guys uh whoever are left with their questions uh from q a section and and stuff uh considering the time constraints that we are already almost uh took 20 25 minutes more still we are left with it that means we need to give more time to the to this session and to the topic so probably we will be doing that uh in the next session and I would like to launch a feedback Poll for you guys to drop your feedbacks regarding the data and the speaker so do put in your opinion and the polls just a second also I will be sharing uh Nathan's LinkedIn profile where you can connect with him and if you guys are having any issues or queries you can clear it out if if he is available yeah I just launched a poll or do do interact with the poll guys also a link to Newton's LinkedIn profile is in the chat section you guys can pick it up from there and you will all uh and you guys will also be getting links for upcoming sessions there uh you guys can register yourselves and get the seats done So yeah thank you nitin thank you really thank you very much for your time and for delivering such a wonderful session and I'm sure our audience found it insightful and hopefully we can conduct more subscriptions with you in future thank you participants yeah bye

Original Description

In this DataHour, Nitin will cover the following topics: 1. Artificial Neural Network 2. Activation functions 3. Convolutional Neural Network 4. Steps to design Deep Convolutional Neural Network model 5. Hands-on with CNN model implementation for Image Recognition 🔗 More action pack session here: https://datahack.analyticsvidhya.com/contest/all/ Stay on top of your industry by interacting with us on our social channels: Follow us on Instagram: https://www.instagram.com/analytics_vidhya/ Like us on Facebook: https://www.facebook.com/AnalyticsVidhya/ Follow us on Twitter: https://twitter.com/AnalyticsVidhya Follow us on LinkedIn:https://www.linkedin.com/company/analytics-vidhya
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Analytics Vidhya · Analytics Vidhya · 40 of 60

1 The DataHour: Data Science in Retail
The DataHour: Data Science in Retail
Analytics Vidhya
2 The DataHour: Anomaly detection using NLP and Predictive Modeling
The DataHour: Anomaly detection using NLP and Predictive Modeling
Analytics Vidhya
3 The DataHour: Energy Data Science Project from Scratch
The DataHour: Energy Data Science Project from Scratch
Analytics Vidhya
4 The DataHour: Explainable AI Need and Implementation
The DataHour: Explainable AI Need and Implementation
Analytics Vidhya
5 The DataHour: Google Cloud AI/ML
The DataHour: Google Cloud AI/ML
Analytics Vidhya
6 Prediction to Production in Machine Learning #machinelearning #prediction
Prediction to Production in Machine Learning #machinelearning #prediction
Analytics Vidhya
7 Practical Applications of Data science in Ecommerce
Practical Applications of Data science in Ecommerce
Analytics Vidhya
8 How to tackle Overfitting?#machinelearning #overfitting
How to tackle Overfitting?#machinelearning #overfitting
Analytics Vidhya
9 Building Data Pipelines on GCP #googlecloud #datapipelines #data
Building Data Pipelines on GCP #googlecloud #datapipelines #data
Analytics Vidhya
10 Hands-on with A/B Testing #abtesting #datascience
Hands-on with A/B Testing #abtesting #datascience
Analytics Vidhya
11 Efficient Implementations of Transformers #transformers #cnn  #machinelearning
Efficient Implementations of Transformers #transformers #cnn #machinelearning
Analytics Vidhya
12 Modern Deep Learning Architecture #deeplearning  #architecture #deeplearningtutorial
Modern Deep Learning Architecture #deeplearning #architecture #deeplearningtutorial
Analytics Vidhya
13 Key steps for Designing Artificial Neural Network (ANN) for Image classification #machinelearning
Key steps for Designing Artificial Neural Network (ANN) for Image classification #machinelearning
Analytics Vidhya
14 5 things you should know about Azure SQL #azure #sql #datahour #datascience
5 things you should know about Azure SQL #azure #sql #datahour #datascience
Analytics Vidhya
15 AI & ML in the Automotive Industry #machinelearning #ai
AI & ML in the Automotive Industry #machinelearning #ai
Analytics Vidhya
16 Building Machine Learning Models in BigQuery
Building Machine Learning Models in BigQuery
Analytics Vidhya
17 NLP aspects in Telecommunication Industry
NLP aspects in Telecommunication Industry
Analytics Vidhya
18 Practical Time Series Analysis
Practical Time Series Analysis
Analytics Vidhya
19 Fundamentals of Quantum Computing
Fundamentals of Quantum Computing
Analytics Vidhya
20 A DAY IN THE LIFE of a Data Scientist (From waking up to working on algorithms)
A DAY IN THE LIFE of a Data Scientist (From waking up to working on algorithms)
Analytics Vidhya
21 Classification Machine Learning Model from Scratch
Classification Machine Learning Model from Scratch
Analytics Vidhya
22 Knowledge Graph Solutions using Neo4j
Knowledge Graph Solutions using Neo4j
Analytics Vidhya
23 Model Guesstimation (MLOps)
Model Guesstimation (MLOps)
Analytics Vidhya
24 ETL Pipelines in Google Cloud Platform
ETL Pipelines in Google Cloud Platform
Analytics Vidhya
25 Key steps for Designing Convolutional Neural Network(CNN) for Image Classification
Key steps for Designing Convolutional Neural Network(CNN) for Image Classification
Analytics Vidhya
26 Getting Started with AWS EC2 #amazon #aws
Getting Started with AWS EC2 #amazon #aws
Analytics Vidhya
27 How to Use Azure NLP and Graph Databases for Intelligent Knowledge Mining
How to Use Azure NLP and Graph Databases for Intelligent Knowledge Mining
Analytics Vidhya
28 Certified AI & ML BlackBelt Plus Program #shorts
Certified AI & ML BlackBelt Plus Program #shorts
Analytics Vidhya
29 Visualizing Data using Python #machinelearning #visualization #python
Visualizing Data using Python #machinelearning #visualization #python
Analytics Vidhya
30 DCNN for Machine RUL Prediction using Time-series Data #timeseries #machinelearning #datascience
DCNN for Machine RUL Prediction using Time-series Data #timeseries #machinelearning #datascience
Analytics Vidhya
31 M in ML stands for Math & Magic
M in ML stands for Math & Magic
Analytics Vidhya
32 An Unsupervised ML approach using Clustering
An Unsupervised ML approach using Clustering
Analytics Vidhya
33 Customizing Large Language Models GPT3 for Real-life Use Cases #gpt3 #datascience
Customizing Large Language Models GPT3 for Real-life Use Cases #gpt3 #datascience
Analytics Vidhya
34 Model Parameters vs Hyperparameters - Techniques in ML Engineering #machinelearning
Model Parameters vs Hyperparameters - Techniques in ML Engineering #machinelearning
Analytics Vidhya
35 Practical MLOps #mlops #datascience
Practical MLOps #mlops #datascience
Analytics Vidhya
36 Data Engineering with Databricks #dataengineering #databricks
Data Engineering with Databricks #dataengineering #databricks
Analytics Vidhya
37 Multi-Objective Optimisation
Multi-Objective Optimisation
Analytics Vidhya
38 When Airflow Meets Kubernetes
When Airflow Meets Kubernetes
Analytics Vidhya
39 AI in Banking
AI in Banking
Analytics Vidhya
Learn Convolutional Neural Network for Image Recognition
Learn Convolutional Neural Network for Image Recognition
Analytics Vidhya
41 Extracting Value from Data
Extracting Value from Data
Analytics Vidhya
42 How to measure Marketing Channel Effectiveness
How to measure Marketing Channel Effectiveness
Analytics Vidhya
43 Transforming Lives | Data Science Immersive Bootcamp
Transforming Lives | Data Science Immersive Bootcamp
Analytics Vidhya
44 Stock Market Analysis - AI driven approach
Stock Market Analysis - AI driven approach
Analytics Vidhya
45 Become a Data Engineering Professional in 2022 | Future Trends + Skills Required
Become a Data Engineering Professional in 2022 | Future Trends + Skills Required
Analytics Vidhya
46 Ensemble Techniques in Machine Learning #machinelearning #ensemble #datascience
Ensemble Techniques in Machine Learning #machinelearning #ensemble #datascience
Analytics Vidhya
47 The Power of Visualization | Tableau Full Course | Analytics Vidhya
The Power of Visualization | Tableau Full Course | Analytics Vidhya
Analytics Vidhya
48 Demand for Data Engineers is on the Rise | Data Engineer | Analytics Vidhya
Demand for Data Engineers is on the Rise | Data Engineer | Analytics Vidhya
Analytics Vidhya
49 Data Visualization in Data Science | DataHour | Analytics Vidhya
Data Visualization in Data Science | DataHour | Analytics Vidhya
Analytics Vidhya
50 Role of Optimization in Machine Learning & Deep Learning | DataHour | Analytics Vidhya
Role of Optimization in Machine Learning & Deep Learning | DataHour | Analytics Vidhya
Analytics Vidhya
51 Solving any Machine Learning Problem | Approach and Steps Involved
Solving any Machine Learning Problem | Approach and Steps Involved
Analytics Vidhya
52 Topic Modeling Explained with Implementation | Using LDA in Python | DataHour by Arpendu Ganguly
Topic Modeling Explained with Implementation | Using LDA in Python | DataHour by Arpendu Ganguly
Analytics Vidhya
53 Data Engineering in E-Commerce | The Best Case Study
Data Engineering in E-Commerce | The Best Case Study
Analytics Vidhya
54 Introduction to Classification using Azure Machine Learning | DataHour | Analytics Vidhya
Introduction to Classification using Azure Machine Learning | DataHour | Analytics Vidhya
Analytics Vidhya
55 Introduction to Federated Learning | DataHour | Analytics Vidhya
Introduction to Federated Learning | DataHour | Analytics Vidhya
Analytics Vidhya
56 Diffusion Models for Generative Arts | DataHour | Analytics Vidhya
Diffusion Models for Generative Arts | DataHour | Analytics Vidhya
Analytics Vidhya
57 Master Google Analytics in 1 Hour | DataHour | Analytics Vidhya
Master Google Analytics in 1 Hour | DataHour | Analytics Vidhya
Analytics Vidhya
58 Learn Hypothesis Testing | DataHour | Analytics Vidhya
Learn Hypothesis Testing | DataHour | Analytics Vidhya
Analytics Vidhya
59 A Practical Approach to Kaggle Competition | DataHour | Analytics Vidhya
A Practical Approach to Kaggle Competition | DataHour | Analytics Vidhya
Analytics Vidhya
60 Making AI work for Business | DataHour | Analytics Vidhya
Making AI work for Business | DataHour | Analytics Vidhya
Analytics Vidhya

This video provides a comprehensive introduction to Convolutional Neural Networks (CNNs) for image recognition, covering the fundamentals of artificial neural networks, activation functions, and the steps to design a deep CNN model. It also provides a hands-on implementation of a CNN model using the Keras API in TensorFlow.

Key Takeaways
  1. Define the structure of an artificial neural network
  2. Explain the role of activation functions in neural networks
  3. Design a deep CNN model for image recognition
  4. Implement data preprocessing techniques
  5. Train and evaluate a CNN model using a labeled dataset
💡 The key insight of this video is that Convolutional Neural Networks (CNNs) can be used for image recognition tasks by applying convolutional and pooling layers to extract features from images.

Related Reads

Up next
RNNs Explained in 60 Seconds #ai #coding #machinelearning
Ascent
Watch →