[00:04:01] Okay, so good morning all. Yeah, so we'll start in just two to three minutes. Let everybody have to join. So then after that, we'll start the session. Okay, so we'll start the session. So I'm sharing my screen. So I had shared my screen. So in last class, we had seen the back propagation. Okay, the back propagation thing. That means we are having the input layer. [00:08:55] we are having the output layer and in between we are having the hidden layer that means we [00:09:01] are having the input layer output layer as well as the hidden layer hidden if we are having the [00:09:06] multiple hidden layer then we can say that particular things are the that particular [00:09:14] hidden layer are whenever we are having the multiple hidden layer that multiple hidden layer [00:09:20] is containing then we can say the deep learning is there okay so we are having the input layer [00:09:27] layer we are having the output neurons is there okay so in the last class we had understood [00:09:36] ki hame we need to perform the forward propagation okay after that we need to perform the backward [00:09:44] propagation so for in the forward propagation what we need to get so this all are the random [00:09:50] weights okay this all are the random weights so we need to assign and we need to multiply [00:09:55] with the input and we need to create the linear combination and we need to add the non-linearity [00:10:00] inside this okay and that will be the non-linearity we need to use okay so we are using the activation [00:10:10] function then we got the output of the first layer then we need to multiply this with the new bed [00:10:17] and again we need to get the linear combination and accordingly we need to get the activation and [00:10:21] we need to get the output now there will be the one actual output is there and one predicted output [00:10:27] is there then we need to get the y1 minus a3 like this or we need to do the squared of this so that [00:10:34] we can get the thing okay then we need to update the weight so during the back propagation we need [00:10:42] to update this all because the input are the fixed thing okay input are the fixed thing so we need [00:10:47] to update the bed back uh update the weight during the back propagation so this is the process that [00:10:54] we had seen okay so this is how we need to see so so if we need to update this particular weight we [00:11:01] need to go like this and like this so this is how we need to update and how we can update the weight [00:11:07] new equal to weight old plus the learning rate into the derivative of j theta with respect to [00:11:15] the theta one one one like this so it will the new weight okay so what is updated so this will [00:11:22] update it either we are saying that theta one one one and the theta one one one is the new one is [00:11:31] here okay so this is how we need to update the weight okay now in today's class we will move [00:11:38] ahead and we need to see the multiple or multi-layer perceptron is there that means we are having the [00:11:43] multi-layer uh hidden layer is there whenever we are talking about the multi-layer perceptron then [00:11:49] we are only thinking about the multiple hidden layer because in every perceptron or in every [00:11:58] network or in every architecture the single input layer and single output layer because output to [00:12:03] fix and the input b but what we can increase we can increase the in hidden layer [00:12:11] in between okay so we need to run it or we are using the keras okay we are not going with the [00:12:20] scratch i told you the concept that means why the multilayer is important because we are having the [00:12:33] single hidden layer use [00:12:36] to the feature cannot be extracted [00:12:38] how many parameters increase [00:12:42] the neuron increase [00:12:44] hidden layer increase [00:12:46] deep learning more complex architecture [00:12:50] and the feature will extract [00:12:53] feature extraction [00:12:55] increase we need to make the multiple [00:12:59] hidden layer and that can be called as a [00:13:02] multi-layer perceptron because single layer perceptron to kuchh bhi result [00:13:06] nahi dega in the real world scenario the single layer is not at all working [00:13:11] okay so multi-layer what is the concept of the multi-layer that means we need to [00:13:18] add the multiple hidden layer only because input one input layer and one [00:13:22] output layer is fixed okay so multi-layer perceptron is the basic neural [00:13:26] network okay then where the hidden layer are the densely connected vector densely connected [00:13:33] with network ka meaning every neuron in the one layer is connected with the every neuron of the [00:13:38] next layer so it's ka meaning kya huwa this ka meaning is like this if we are having [00:13:43] the input and we are having the multiple hidden layer okay this all can be the hidden layer [00:13:49] okay and this is the output layer so this is the input layer this is the output layer this [00:13:53] is hidden layer one hidden layer two hidden layer three so it is like this in saare humare connected [00:14:01] everything now this this this this this this this is also connected this is also connected this is [00:14:08] also similar like this okay so this is called as densely connected layer okay densely connected layer [00:14:16] okay sir i have a question what is the classifier and model or difference between them the classifier [00:14:23] and model both are the same if we are talking about the classification if we are talking about [00:14:28] the regression then we can say it is a regression okay the model is the generalized term we are [00:14:35] creating the model it can do anything the model is the bigger term while the classifier is the [00:14:48] subset of the model okay so in this in this particular uh lab we are expecting the [00:15:00] or we are doing the we are doing the classification so we need to apply the classification of the [00:15:05] mnist data set so mnist data set is already present inside the keras okay inside the keras [00:15:12] so keras is a library that are having the all the deep learning model okay keras can this are a deep [00:15:19] learning model already so we can build the network in the progressive manner so you can get the [00:15:26] understanding okay so you need to get the understanding so uh you can take this particular [00:15:33] slide after the class so what you can do okay you need to run and you need to uh think about this [00:15:39] okay but right now i am explaining this so this is the tensor flow inside the keras inside the [00:15:45] data set the amnish data set is there so inside the keras we can think about key there will be [00:15:52] the amnish data set is already available okay so first thing we need to import each and every [00:15:58] library that are responsible in the future okay so numpy the very important because we need to [00:16:05] perform the numerical python okay so numpy is responsible now the keras.initializer okay yes [00:16:13] keras.initializer what do you mean by the keras.initializer it will create and it will import [00:16:18] the random normal that means keras initializer is used for creating the weight okay that is [00:16:26] is a theta 1 theta 2 theta 3 this all bed can be initialized by the keras okay keras [00:16:34] can the bed initializer via and if we are writing the keras dot initializer yet we [00:16:40] need to import the random normal random normal to import the random normal [00:16:45] meaning randomly we are creating the beds okay so all the things are inside the [00:16:52] keras the beauty of the keras is that we can design any kind of the machine any kind of the [00:16:58] deep learning model inside the keras okay so keras ke under all the things is there the someone has [00:17:04] shared the very good document about the keras so you can think ki keras ke under initializer hai [00:17:09] and this is responsible for creating the weight okay yeah now keras dot layer so keras ke under [00:17:16] Already the layer is also [00:17:18] So we can add the layer [00:17:20] We can import the activation layer [00:17:24] We can import the dense layer [00:17:25] We can import the dropout [00:17:27] We can import the flatten [00:17:28] We import the ReLU [00:17:30] So ReLU is in one kind of the activation function [00:17:36] The flatten layer [00:17:37] What do you mean by this [00:17:41] 1 1 0 1 0 0 0 0 0 1 then is this vector is go flatten that means 1 1 0 1 0 0 0 0 0 1 like this [00:17:55] yes go flatten layer to flatten layer apply although it will convert this particular okay [00:18:00] and dense layer yeah you can use the pie touch also yes you can choose the pie touch it's not [00:18:08] like this the keras the first time the keras is started okay keras say you can use the pytorch [00:18:18] also you don't have any issue you can use okay there is nothing difference between the keras [00:18:26] and pytorch only the syntax wise the things are having the problematic okay you can use keras work [00:18:34] with the tensor proprietors yes it is there okay yes it is there now inside the keras there will [00:18:39] be the model is there so we are importing the model so whatever the model we are using we can [00:18:45] use okay now we are having the optimizer we are having the optimizer so what do you mean by the [00:18:52] optimizer optimizer is run whenever we are performing the back propagation so during the [00:18:58] the back propagation we have a uh use the gradient descent now this gradient descent is called as an [00:19:05] optimizer so inside the keras there will be the one kind of optimizer is there that can be the [00:19:11] adam optimizer apart the adam optimizer there are the different kind of the optimizer also [00:19:17] ada grade hd the adam this all are the types of the optimizer okay you can search on the [00:19:25] there are lots of optimizer is there so adam is a good optimizer and the recommended optimizer it [00:19:34] is a very well optimized if we are talking about any other optimizer so what is this it is it is [00:19:40] the adaptive momentum is there adaptive momentum ki ka matlab kya hai woh learning rate automatically [00:19:46] decide kalta hai okay that can be the adam okay so there are lots of thing is there this is the [00:19:54] very important things but there are lots of things to explain so some things you can also [00:19:59] explore from the internet also okay so whatever your doubt is there you can take the help from [00:20:05] the internet also okay why we are using the adam only in the this particular yes there we are not [00:20:11] using the adam abhi right now neechhe mein bata honga you need to wait for this okay right now [00:20:17] i had imported the thing okay adam is a good optimizer that's why i had imported but first [00:20:23] time checking with the sgd then we are moving to the adam we had done the lots of experiment in [00:20:28] this particular slide which is pure expected here is pure ivy and we had performed the lots of thing [00:20:36] so you can understand so inside the keras there will be the some util packages there that will [00:20:43] convert the two categorical then it can convert the plot thing then we are having the keras dot [00:20:50] data set so we are we had imported the mnish data set and also we had imported the metflotlib for [00:20:55] the making the graph okay so this is the complete import thing is there you had used or kuchija we [00:21:03] need to import okay so just like whatever we are using in the future we had imported this particular [00:21:09] thing okay now okay so now the data set i am talking about the data set so what is the data set [00:21:19] data set is the amnesty data set that will be the modified national institute of standard and [00:21:24] technology this will tell the handwritten recognition is there in this there will be [00:21:29] the 60 000 images there so we had converted the 60 sorry 70 000 image so 60 000 in the training [00:21:36] while the 10 000 is in the testing so each is having the 28 cross 28 pixel sizes there and [00:21:43] it is having the zero to nine character is there ki ek bhi hoga do bhi hoga three bhi hoga [00:21:49] four bhi hoga like this why we are importing particular things from the keraj dot model [00:21:53] or the keraj dot layer we can import complete yes you can do you can do the complete but oh [00:21:59] it will take the more computational complexity [00:22:04] yadhi tum sara import kar doge to it will take the more computational complexity [00:22:09] what is the need okay so importing only yes that makes the code cleaner yes it is very good [00:22:28] so amnist load data this will make uh this will load the data okay so now what we need to do we [00:22:36] had imported mnist dot load data okay because we had already imported this now we are converting [00:22:42] this into the train or test me divide then there will be the test and 10 okay so this is the x [00:22:49] train y train x test y test that means we are having the x train save will be the we are having [00:22:57] the 60 000 and each image is of 28 cross 28 and we are having the testing we are having the 10 000 [00:23:05] and we are having the 28 cross 28 okay so that means we had converted we had loaded the data [00:23:12] which data we had loaded the amnist data and how we are converting we had converted the x train [00:23:18] as well as the x test that means we had converted it into the training and testing now what is [00:23:24] inside the extreme there will be the 60 000 image and what is in the by train they are associated [00:23:30] character value ki yadhi koi value hai woh is tariqe ki dikhar hai hai then we are assigning ki [00:23:35] yeh zero hai yeh one hai like this then in the testing x test is containing the ten thousand [00:23:42] images while the y test is containing the its associated value now we are getting and we can [00:23:49] see ki x trend kesa dikhar hai suppose that the first x trend will be the five so this is looking [00:23:54] like the five so this kind of the data set are inside the amnist okay so this is one [00:24:00] kind of the example is there okay that is the x train dot x train zero okay x train zero meaning [00:24:07] kya hai the first item so first item is looking like this five and it's associated y train is [00:24:14] also five so this is supervised learning kind of thing is there that we are having the input data [00:24:19] and we are having the it's associated level is there that means we are having the label data [00:24:25] of the 70 000 image now we need to train that particular model using the various setting [00:24:32] various setting because we are having the multiple model we had created one by one [00:24:38] we will see how we use the model how your deep learning understanding will build [00:24:46] okay definitely you will understand something from this particular slide 100 i guarantee you [00:24:52] okay so this is there now we are saying now we need to see the data distribution i am little [00:25:00] bit skipping some of the things because this is the very big thing whatever the important thing [00:25:05] i will tell that particular thing and you will get you each and everything now the data set [00:25:10] distribution what it's so data set not distributed if it is evenly distributed then it is the perfect [00:25:18] and the ideal situation is there but ideal situation is not exist in the real world so [00:25:24] we need to check okay we need to check how we need to do okay so we need to check that y train [00:25:31] because inside the y train we are having the different different values ki zero hai one hai [00:25:36] two hai three hai four like this so we need to print so this is the y train that means zero [00:25:43] so this is the total because this whenever we are combining all this this will be the [00:25:57] 60,000 so out of the 60,000 how many zero value is there how many one value is there [00:26:03] because classes we are living the 10 classes the zeros and nine so what is the kind of [00:26:10] data modeling we are expected to do in the real time because here we are directly loading the [00:26:15] data which without any understanding about the data itself can you give some in light on the [00:26:22] here i had given the insight about the data set what is this particular data set i'm telling this [00:26:28] but in the real world scenario what happened we are having the problem definition [00:26:33] according to the problem definition that you need to the problem definition is that [00:26:40] you need to uh you need to perform the classification over the satellite image [00:26:48] just like this this is a problem definition so and associated data set is also given okay if [00:26:55] associated data set is also given then you can import through the pandas.readcsv or pandas.read [00:27:02] image okay so you can import data set can you say we import karo we had imported here with the m this [00:27:09] load data set but you can import the data set from the pandas also okay it's just a small thing the [00:27:17] data importing is the very small thing once the data is importing we can go ahead with like this [00:27:24] okay so what kind of data set preparation data preparation we need to perform the data cleaning [00:27:30] we need to perform the data augmentation all are the data pre-processing okay whatever the things [00:27:35] you had read in that thing you need to go ahead okay i understand the data pre-processing i am [00:27:44] talking about the data pre-processing in the data pre-processing you need to do the data augmentation [00:27:49] if the data is in the numeric form then you need to perform the normalization and standardization [00:27:55] if your data is in the image then you need to go ahead and think about the normalization you need [00:28:01] to make the proper resolution just say what is the thing we have important thing that all the [00:28:08] training data is having the 28 x 28 different different set maybe image some of the image [00:28:16] is in the 192.192 okay some of the image into 192 to 19 and some of the image are [00:28:22] 438 into 438 like this okay this may be so sabhi we need to convert into 28 cross 28 then only [00:28:30] our model can be taken okay so this is called as the data pre-processing one kind of the data [00:28:36] process and there are lots of things data augmentation okay that means some image are [00:28:41] looking like this we can convert if if there will be the one image then we can convert like this [00:28:47] the a core image that will this is the data augmentation we have lived the 90 degree okay [00:28:53] 90 degree flip so this is one kind of the data augmentation is there so there are lots of things [00:28:58] are there in mldl aprox 90 percent time goes into the data preparation and feature 100 percent [00:29:06] whatever you the first thing is that we need to understand the data once you had understood the [00:29:12] data you need to prepare pre-processing of that particular data according to our application [00:29:21] so it's not the single time process you need to get [00:29:26] case of separate data liya and you need to run it or the result [00:29:33] that means this is the iterative method okay this is the iterative method is there [00:29:38] are we reducing the number of neuron in the hidden layer to reduce the [00:29:42] not like this reduce the Dimensity if we are the go the good answer is that if you [00:29:49] are getting if you are getting the good result in the pipe layer then you need [00:29:55] not to increase the layer how many six layer key needing you then [00:29:58] jitna jada layer increase karo got nahi model complex over okay so rather than [00:30:04] increasing the hidden layer we need to start with the very first thing and do [00:30:09] the hit and trial method okay then first we'll run with the five layer sometimes we need to run it [00:30:14] the fourth definitely you will get this particular answer after completing this just a bit kindly [00:30:20] give detail around there then in the real industry time the training would go around the rapper [00:30:26] class but the data must require yes it is there it is very much important thing data pre-processing [00:30:33] okay data pre-processing i am doing data pre-processing right now just a bit okay [00:30:40] now i am moving ahead because there are lots of things to describe if i am giving this all the [00:30:46] answers then i can move i am not moving ahead just wait and understand okay huh then a plot [00:30:54] dot figure is there plot dot historical is there so we are having the y train okay we are having [00:31:01] the y train so y train are looking like this now i am doing the data normalization whatever you told [00:31:08] that we need to prepare the data how we can prepare because we are having the categorical [00:31:14] level categorical level kya batara hai the seven seven digit but we need to convert it into the [00:31:20] one hot encoding okay so one hot encoding is the one kind of the encoding technique [00:31:26] to convert the categorical level into the numerical level because our total machine [00:31:32] learning will understand about the or total deep learning you will understand about the [00:31:37] the numeric data okay well numeric data that means we have image suppose that this is an image we are [00:31:45] converting it into the matrix and what is the matrix it is the 0 to 255 the pixel value is [00:31:51] there just like its pixel value is 00 but here pixel value is 255 0 128 250 125 128 like this [00:32:01] so this is the matrix 4 x 4 matrix so this is just like a data preparation is there okay so we are [00:32:11] indicating okay so here are the thing is there just like print karna hai y train ko or what is [00:32:18] inside this so this is the first thing that we are writing ki pehli class will be the 5 joh [00:32:23] amne dekha tha then the next class next class will be the 0 then then the next class will be the 4 [00:32:29] then next class is one so rather than using this rather than using this we need to convert it into [00:32:36] it into the one hot encoding okay one hot encoding and what do you mean by the one hot [00:32:41] encoding it's just like a recommendation okay it's just like a recommendation okay anuja just [00:32:49] wait i am taking your question i had already taken your question okay it is very important [00:32:57] thing i understand the data preparation is the very important thing but the main concept is to [00:33:04] understand the deep learning model the i know data pre-processing and we are having the definitely [00:33:11] the different class for the data pre-processing okay so i am not doing i am not skipping your [00:33:18] question the thing is that there are lots of things to describe at the end i am definitely [00:33:25] give your answer okay definitely give your answer just a bit okay uh so we had converted okay we [00:33:34] had converted now one hot encoding one hot encoding is just like the we are converting this particular [00:33:43] okay actually i i am not telling i am 100 giving all the answer but the thing is that there are [00:33:50] lots of things to describe in the last class also we didn't complete the thing okay that's why there [00:33:57] will be the little bit thing is there i am taking your question in last 10 minutes just bear with [00:34:02] this okay i'm definitely take all the question okay because if we are going because we have a [00:34:10] very limited time okay yeah so we are with this please please okay yeah so yeah in the last in [00:34:20] the last okay we had converted this particular value into the one hot encoding okay one hot [00:34:27] encoding kya kata hai whatever the answer will be the true we need to assign that particular value [00:34:33] as a one otherwise all the value are zero so this is the first understanding about the five ki five [00:34:39] representation is the four times zero five times zero then one then four times zero this is the [00:34:45] representation of the five and what is the representation of zero the zero value will be [00:34:50] the one while other value can be the zero the what is the value of the four then this is the [00:34:55] fourth value will be the zero otherwise sorry one otherwise all the value are the zero so we had [00:35:01] converted our value into the or by train and by t ht converted into the categorical manner okay [00:35:08] and what is the categorical we are applying the one hot encoding okay so we had converted the [00:35:14] one hot encoding one hot encoding kya karra hai categorical values ko binary values me [00:35:19] convert kar te ra hai that's it okay now we had it now your question the data normalization the [00:35:27] data normalization it is the one kind of the data pre-processing okay the inside the data [00:35:33] pre-processing there will be the two step is there we are performing the first step is we [00:35:38] need to make the all the value into the 28 cross 28 that is the most important data pre-processing [00:35:46] we need to do okay koi si bhi different because in the real scenario what happened all the image [00:35:51] are having the different different shape koi si image hogi 1498 cross 498 hogi kuch 1260 into 1260 [00:35:58] hogi okay like this kuch image aas ji bhi mein hogi to all the things we are converted [00:36:05] so iska resolution we need to fix the 28 cross 28 if the different different shape of the image [00:36:12] will go into the model then model doesn't work the first thing okay first kind of the pre-processing [00:36:18] the second we cannot give the rgb value rgb value then get to what is the three channel data jayega [00:36:24] three channel data jayega that means one is the r second is the g and third one is a b [00:36:29] so rather than using the three channel we are converting this into the great channel okay [00:36:35] great channel convert so that the single channel that means we converted into the black and white [00:36:41] image so this is the one kind now the third technique is the data augmentation sometimes [00:36:47] what happened we are not having the so many we are not having the so many images we need to [00:36:55] argument that we have 100 images but for the deep learning there will be the lots of images [00:37:01] are required so we are converting it into the image 10 times multiply that means [00:37:08] in the horizontal weather vertical clip like this 100 image [00:37:17] we can convert so this is again one kind of the data pre-processing now the next data [00:37:22] pre-processing is when we need to convert the data into the normalization we need to perform [00:37:27] the normalization for that so this is one kind of the thing is there okay so any other way apart [00:37:34] from the one hot holding yes there will be the other way is also there in apart from the encode [00:37:40] one hot encoding we are having the label encoder and the ordinal encoder is there that we need to [00:37:46] convert all the data into the zero one two like this okay there is the other ways also there [00:37:53] embedding target encoding yes you can perform the embedding target encoding frequency encoding [00:38:00] this all in the text data set so based on the different different data set we need to perform [00:38:05] the different different normalization technique or different different kind of the encoding technique [00:38:10] so based on the input hume data ka pre-processing decide karna hai if we are having the different [00:38:18] thing then we are having the different thing humare paas image data hai we need to perform [00:38:22] the different data previously if we are having the numerical data we need to perform the different [00:38:26] thing now what we are doing our next step is the data normalization okay because neural network [00:38:33] is working well whenever we are having the small value okay small value ka meaning kya hai that [00:38:39] means whenever our value is in between the zero to one then it will perform the very good thing [00:38:44] okay when to the question is asked why the user is that when to choose the what okay yes it is [00:38:53] the very good thing so again the answer is that it is not the recommended thing you need to try [00:38:59] each and everything and you need to perform there will be the theoretically the different [00:39:04] thing are proving but practically we are not saying embedding or target encoding is best [00:39:11] or data normalization is best so what you need to do you need to perform the one kind of the [00:39:17] data pre-processing and run the complete model then you need to check the accuracy and whatever [00:39:22] the thing is there then you need to again prepare the second model with the different pre-processing [00:39:27] and again you need to apply the data modeling okay then you need to check with the accuracy [00:39:34] so that means this is the trial and error method that's why the machine learning [00:39:38] is not having the thumb rule there will be the no thumb rule is there [00:39:46] okay so there will be the three things right now i am giving the very good [00:39:51] understanding to you just understand there will be the data set okay then there will be the pre [00:39:58] processing okay then there will be the model and there will be the evolution matrix okay just listen [00:40:06] this evolution matrix so what what is the fixed thing the fixed thing is the data set we cannot [00:40:15] change the data so what you can change you can change the pre-processing there are lots of [00:40:20] things are under the pre-processing so with this pre-processing we need to create the [00:40:27] this and we are also having the different model and we are also having the different matrix so we [00:40:34] need to make a combination of this this case are this combination is a combination so there are the [00:40:40] different n combination you can create okay there are the different n combination you can prepare [00:40:46] and just like for this you need to prepare m1 m2 m3 m4 just like you had prepared the thousands of [00:40:53] the model hundred thousand model we can prepare and out of this we can choose yes this will give [00:40:58] the highest accuracy so we can choose this either you can fix the metric we check so you had fix [00:41:07] this thing you had fix this thing now you can change this complete thing or either you can fix [00:41:12] this also then complete model change and if we get fix the model then we can change the different [00:41:18] pre-processing like this there are the four different thing is there okay there will be [00:41:23] the four different thing is there so what kind of the normalization is preferred in what case [00:41:27] yes it is the hidden trial can embedding also done on the image embedding is done on the image when [00:41:36] whenever we are converting the image into the web tab then we can perform the embedding [00:41:41] because embedding is performed over the numeric data yes we can compare the result 100 it is [00:41:48] always around the experiment a grade but it's majority around the experience 100 experience [00:41:53] so that is the recommended thing some are the recommended thing that that is written in the [00:41:58] theory that's why our thing that we need to kindly share your experience and would be here 100 i am [00:42:04] telling so i am telling whenever you are having the numeric data then 100 time we are applying [00:42:10] the normalization okay whenever we are having the image data then we are applying the uh we are [00:42:18] applying the data augmentation okay whenever we are having the text data then we are applying the [00:42:24] the embedding okay that is my experience that is my experience sir one hot encoding is the [00:42:30] filling matrix mostly with the zero which is not create the issue yes it is not creating the issue [00:42:36] okay it is just like the representation one hot encoding is the one kind of the representation [00:42:42] is there because uh every time the model is learning through the matrix to have [00:42:51] okay is this called optimization uh yes it is one kind of the optimization is there whenever we are [00:42:59] saying that we are achieving at the first trial we are achieving the 70 accuracy and at the second [00:43:06] trial we are achieving the 75 then something optimization we had done either we had used the [00:43:12] data pre-processing either we had to do the model changing whatever thing is there this is called [00:43:17] the optimization so which set is preparable for the ml beginner the keras 100 you need to work [00:43:23] with the keras and cycle it is very much easy pytorch is little bit tougher hundreds or thousands [00:43:30] of the value that you can use the frequency encoding for the you can target for the deep [00:43:35] deep learning model you get yes you it's just a recommendation thing is there okay so now we are [00:43:40] moving ahead at least we had completed the one model okay so yes there will be the normalization [00:43:46] because our value is in between the 0 to 255 joe image we had taken into the input we are converting [00:43:52] it into the 0 to 1 okay whatever the value is in the 0 to 255 we had converted the value into the [00:43:59] 0 to 1. So, we are divided by the 255 because from where the 255 value is coming because [00:44:09] the pixel size fix 0 to 255. If any image data set is there, if we are converting it [00:44:18] into the matrix then everywhere the 0 to 255 value is there. So, we are divided that particular [00:44:24] value with the 255 so our complete data is converted into the 0 to 1 now in the 0 to 1 [00:44:31] so we had completed the data distribution we had completed this okay that's what i mean try to [00:44:39] error in the experiment which is not the right route always some of the yes 100 percent but [00:44:45] your answer is 100 correct we had learned from the experiment but it is also the not [00:44:54] a good practice but but this is the eighty percent that particular things are the true [00:45:02] whatever you would say that is the eighty percent true not the hundred percent because machine [00:45:07] learning and deep learning are the probably gives the probabilistic value okay probabilistic value [00:45:13] data is performing good we don't say okay sometimes just like okay i am telling this [00:45:23] somebody is creating this d1 data set and d1 data set pe you are performing m1 okay m1 thing okay [00:45:32] with the some p1 accuracy so p1 pre-processing okay but now the data set is fixed now somebody [00:45:42] is created the m2 model with the p1 now this can be the good choice okay jaroorih nahi hai ki [00:45:48] uh mlp is working fine with me okay mere saath yadi mlp achcha perform kar raha hai toh for you [00:45:58] the mlp is good tumhare liye ho sakta cnn achcha perform kar jahe okay so it's just a some [00:46:05] things are the just a recommendation thing whatever i told okay but you need to understand [00:46:10] through the learning through the learning because if i am giving direct answer to you [00:46:15] yes this this particular things are the good so you can read the theoretical thing so this is the [00:46:22] theoretical thing but theoretical and practical may both differences there are lots of difference [00:46:27] between that okay so i am trying to say i am trying to say again and again make you deny [00:46:34] tomorrow answer yes you are 99.99 percent correct but i am not saying you need to take this as a [00:46:42] hundred percent correct every time the answer will change according to the data set according [00:46:48] to the model according to the pre-processing so hit and trial or trial and error method is the [00:46:54] complete good thing okay that this is the perfect answer because as a teacher i need to tell this [00:47:00] particular answer that you need to do the trial and error method because the i can give only the [00:47:06] recommendation i am not trailing okay this is the hundred percent just like there are the different [00:47:10] subject is there data structure the algorithm if i am trying to tell this particular disaster [00:47:16] algorithm where is working like this that hundred percent disaster algorithm is working like this [00:47:22] but machine learning the that particular things doesn't work [00:47:28] okay just like i am here and i had told cnn is working fine cnn is a very good model [00:47:35] okay and someone is trying to tell sir nai transformer is also working fine mlp is also [00:47:42] also working fine ho sakta mlp is the lower model cnn ke pahle ka model but for the sum of the data [00:47:50] set mlp is working fine and cnn is not working fine this may be there okay okay so [00:48:01] yes there are different thing is there so it's based on the different different scenarios so [00:48:10] it's a scenario based answer is there okay yeah okay don't be panic every one every question is [00:48:18] the good question and don't be uh think much about this 100 all the answer answer is the correct [00:48:25] all your question is also correct okay because it's based on the understanding i understand [00:48:30] that you want direct answer but i can't give the direct answer okay from the theoretical concept [00:48:37] i had given just say in the machine learning we had learned logistic study sbm study knn study like [00:48:43] this so i am telling yes sbm is a good why because logistic and knn study but it is not like this [00:48:51] for some of the data logistic regression will perform well sbm will not okay so this is one [00:48:57] kind of scenario so uh we can stop discussing right now we can move ahead [00:49:05] okay you need to little bit understand okay huh so we will start with the classifier architecture [00:49:14] okay now we had completed the data from the data set pre-processing curly data distribution all the [00:49:20] things that liya now we are started we are preparing the first model okay we are preparing [00:49:27] the very first model and that will be the classifier architecture either we are saying the model or [00:49:32] classifier both are the same if we are performing the classification so what we are telling to [00:49:38] hum a fully connected network when i get 1d hidden layer when i get or in calia which layer is [00:49:44] responsible dense layer so dense layer is also inside the keras okay now we are having the 28 [00:49:51] cross 28 ka input jayega okay now what okay abhiya 28 cross 28 ka input jayega we are using the [00:49:58] flatten layer flatten layer kya convert kardegi 28 cross 28 co convert kardegi in the single vector [00:50:05] and that particular are the 784 okay just like this i'm the 28 cross 28 28 cross 28 ka is [00:50:12] this way then we are applying the flatten layer or this will convert the value into the 784 into [00:50:20] 1 he is 784 so we are applying the flatten layer over there and dense layer ka meaning [00:50:26] kya hai each and every network are connected with each other like this okay so we are doing this so [00:50:33] okay then there will be the one in it is there you need random normal what means that we need to make [00:50:40] the theta or we need to start with the weight. [00:50:45] What is the first weight? [00:50:46] Weight to start. [00:50:48] But how we can assign the weight? [00:50:50] Through the random normal function with the standardization. [00:50:54] Standard deviation will be the 0.02. [00:50:56] So we prepare the weight which is standard deviation 0.02. [00:51:00] Again, this is not the perfect thing. [00:51:03] It is not necessary to change the 0.02. [00:51:05] You can change the 0.04, whatever you can take. [00:51:08] It's not the fixed thing. [00:51:10] okay output layer can there we are having the 10 unit because we are having the 10 classes now what [00:51:17] is in dropout because a neural network has a tendency there are over sometimes the overfitting [00:51:25] maybe they are okay so every time the feature every neuron cannot be come into the picture [00:51:34] sorry neuron that's why we are putting the sum of the dropout just like if we are putting the dropout [00:51:41] as a 0.45 so in the first layer if in the first layer 256 unit is there and if we are applying [00:51:48] the 45 percent as a dropout then the 1 minus 45 0.45 into the 256 that means 140 unit can be [00:51:58] considered in the first layer while the other whatever 96 cannot be comes into the picture [00:52:06] because just like here okay just like here okay [00:52:14] yeah consideration suppose sorry suppose that this much of the input is consideration so [00:52:21] we can apply the 0.33 as a drop out to a neuron drop out [00:52:30] okay neuron will drop out okay drop out means a this neuron cannot be come into the picture only [00:52:38] the dish 2 can be go there okay now the machine learning can give oh sorry this learning deep [00:52:46] learning can assign either we are dropping this either we are dropping this or we are dropping [00:52:52] this so we are having the multiple neuron multiple neuron neuron consideration so that [00:52:58] it cannot perform the it cannot perform the overfitting okay so this is one kind of the [00:53:04] dropout function is there now the next thing that we need to understand the optimizer we are using [00:53:10] the sgd optimizer right now we are not using the adam optimizer we are using the stochastic gradient [00:53:17] descent optimizer so this is okay this is only the one kind of the gradient descent is there [00:53:23] stochastic gradient descent ka meaning kia hai it is only the derivative but with the different case [00:53:29] okay with the different case uh okay i am explaining the dropout once again okay [00:53:36] just listen the sgd after that we need to tell the dropout so the optimizer means always we are [00:53:42] talking about the gradient descent and there are the lots of gradient descent is there there are [00:53:47] the different different kind of the gradient descent is there only that means the derivative [00:53:52] of the error function okay so what is the sgd sgd is a one kind of the thing that can be [00:53:58] give and that can compute the approximate value of the descent so there are the all other optimizer [00:54:05] is there just like a ada grade adam so adam is a good optimizer right now okay abhi ki condition [00:54:12] me the adam will be the right choice okay kya theoretically proven okay i am not saying [00:54:19] saying ki practically proven again this is just like a recommendation again it is just like a [00:54:25] recommendation okay so it is not the hundred percent thing it's just like a recommendation [00:54:30] okay so yes we had explained all the things but now i need to tell about the dropout so [00:54:37] what do you mean by the dropout dropout is the one kind of the layer is there [00:54:41] okay that means suppose we are making the neural network like this okay then each neuron is [00:54:48] connected with each other okay that means then densely connected so jitna jada neuron [00:54:55] one a few [00:54:57] feature extraction [00:54:59] okay feature extraction [00:55:01] maybe there so [00:55:03] the feature extraction [00:55:05] that might be possible [00:55:07] that will be overfitted [00:55:09] overfitted [00:55:11] that means our training accuracy [00:55:15] will be the 98 [00:55:17] testing accuracy will be the 70 [00:55:19] percent like this so this is the one [00:55:21] kind of the case of overfitting [00:55:23] Okay, this is over fitting. So, if our model is over fitting, so during the back propagation, what we can do, we can make the drop out. Okay, drop out meaning is particular hidden layer, hidden layer 1, we are not using all the neurons. Suppose that we are using the 100 neurons and we are applying the 0.2 as a drop out. [00:55:49] 20 neuron is not taken into the consideration only the 80 neuron into the consideration [00:55:56] feature over fitted rather than this accuracy in 96 okay your testing accuracy will be [00:56:07] 95 okay so this is the again the theoretical concept what we will see this into the practical [00:56:15] okay so how it will decide which one will be the dropout yes this is again question okay so [00:56:23] it's a recommended thing again it's a it is decided by the trial and error but it is the [00:56:31] recommended thing हम हर layer में in h in every layer we are making some of the dropout [00:56:38] कुछ dropout लेके चलते हैं okay कुछ न कुछ लेके चलते हैं कि सारे [00:56:42] neuron consideration में नहीं आएं, okay, it's just a random, हो सकता है [00:56:47] sometimes, 100 neuron है, तो कौन से 20, यदि ये 4 neuron है, out of this 4, [00:56:54] if we are applying the 50%, तो sometimes ये neuron और ये neuron cut हो सकता है, [00:56:59] in the next iteration, this neuron or this neuron cut हो सकता है, in the next [00:57:03] neuron में, ये neuron और ये neuron cut हो सकता, it's just like this, okay, [00:57:08] so that can be decided by the model, because it's just a random thing, okay, [00:57:13] that will done by the relu or as you used relu no no relu is the different of activation function [00:57:20] i am taking okay relu dosra concept okay now the last thing because it's a binary cross entropy [00:57:28] sorry it's a binary class it's a multi-class classification that's why we are working [00:57:35] categorical cross entropy so this is one kind of the error calculation is there in the two class [00:57:41] if the two class is there then what is the binary cross entropy the binary cross entropy is the y [00:57:47] log y minus 1 minus sorry 1 minus y log 1 minus y it is like this okay this is the binary cross [00:57:56] entropy so similarly the categorical cross entropy is also there okay it is also there so this is the [00:58:03] error calculation now i am telling the very first model you need to see okay you need to see that [00:58:10] we had made the defined classifier that we had made the one function that will be the defined [00:58:15] classifier and we need to fit the image save image save what is the