# 12 2026-01-11 Transfer Learning in Deep Learning course: Module 2 — Machine Learning Algorithms module: Module-2-Machine-Learning-Algorithms date: 2026-01-11 type: transcript video_url: https://personal-learn.armco.dev/files/_Recordings/Module-2-Machine-Learning-Algorithms/12_2026-01-11_Transfer_Learning_in_Deep_Learning.mp4 --- [00:14:04] And the third research paper, which I would like you to sort of go through. [00:14:09] your free time would be a practitioner's guide to transfer learning. Otherwise, what happens is, why Practitioner's guide is. [00:14:16] Otherwise, it becomes, like, you know, very theoretical in nature, right? Both these approaches, guys, if you look at only the practical aspects, you will not be able to understand what are the. [00:14:26] What is the motivation of whether I'm on the right track or not. Second is, if you look at only the theoretical aspects without the practical aspects, basically, then again, you're at a loss. [00:14:36] So this basically tells you a few strategies and ideas as to how you can go ahead and practically implement. [00:14:43] And good paper, because this has been written by Indians. You can see Ship Shankar, you can see Kauru Mathur. [00:14:49] to Shar Sembol and promote, right? They've written in Indian English, so I think you can relate to this. [00:14:57] Right? Next paper is, uh, transfer learning, a friendly introduction. Again, I'm just choosing this because it is not. [00:15:03] highly technical. Otherwise, what happens is you lose interest with so much of technical jargons. Again, this is also a good paper, easy to read. The last two papers are quite easy. [00:15:12] This is, again, I think I downloaded this twice. Okay, so if you read this, basically, uh, you'll be able to gain rich perspective about transfer. [00:15:22] Okay. Well, let's come to the motivation. What is the thought process which drove people to using transfer learning, so on and so forth? [00:15:32] Now, as I mentioned, basically. Oh, this is the guy, right? Nuts and bolts of, uh, building AI applications using deep learning, wherein he was… this guy, Andrew, and. [00:15:43] Uh, he made a remarkable speech where he said that, uh, after supervised learning, right. [00:15:50] Unsupervised learning, it is useful from a learning perspective, but from an industrial usage perspective, unsupervised learning is not given that much importance. [00:15:58] Maybe in your entire career. of 10 or 15 years, there may be 2 or 3 occasions wherein you may use unsupervised learning. [00:16:08] But most of the projects and systems that you will be encountering will all be supervised machine learning. [00:16:13] So what this guy said, Andrew, what he said is, after supervised learning. [00:16:19] Transfer learning will be the next biggest driver of ML commercial success, which means from a commercial point of view, not from a theoretical perspective. [00:16:27] But transfer learning will be able to revolutionize the way we work with machine learning models. [00:16:34] Why… how… we'll just see the coming slides, okay? [00:16:38] Firstly, at a very high level, if you ask me what is transfer learning, correct? Transfer learning, it's simply a machine learning technique. [00:16:44] It is no different from any other technique. It is not one single technique. It is, like, a subject by itself, right? [00:16:51] It is a subject by itself. You may take around… you may take quite a bit of time to, you know, wrap your head around the nuances of this, but as of now. [00:17:01] Please understand that it is a machine learning technique where. [00:17:06] The model which is trained to learn one particular task. You have trained a model to learn one particular task. [00:17:14] That very model you're using, uh, as the foundation or as the starting point to do. [00:17:21] Another task, uh, another… another application. So it is like saying, you have learned one particular task. Let's say you have learned how to drive a bike. [00:17:31] Fantastic. Now, when you… given that you have learned how to, uh, drive a bike. [00:17:35] Let us say, after 6 months, you want to learn how to drive a car. [00:17:38] Now, you don't have to start learning the car from scratch, you know, at least in Indian context. [00:17:43] the fact that you know how to drive a bike, you know, left, uh, before you drive on the left side, basically. [00:17:49] you show the hand signal before you turn, you put on the blinkers. [00:17:54] Uh, you put on the indicator, you give a hand signal, so on and so forth, how do you make a U-turn? You show the signal. [00:17:59] red signal, uh, what it indicates. We all know this. Once you have learned this for the first task. [00:18:07] Now, 6 months later, you don't have to start from the scratch, and the driving guy, basically, your driving mentor or teacher, basically, he is not going to start from the scratch and say. [00:18:19] This is what you learned. You will say, no, but anyway, I know these things, you straight away go to, uh, how to, uh, you know, drive a four-wheeler. [00:18:25] Which means what you have carried forward, your learning… the learnings that you got from riding a bike. [00:18:33] to the learnings that you will be implementing for the second task. The first task is riding a bike. [00:18:38] The second task is driving a car. the learnings that you obtained while riding a bike, you have been able to transfer. [00:18:45] to driving a bike. Now, this is true for human intelligence. [00:18:50] For human beings, basically, this is how we do. [00:18:53] Now, let us say you have learned how to play classical piano. I'm just giving you a second example. [00:18:57] Now, when you are trying to learn, if you are trying to learn, let's say, jazz piano, you don't have to start from zero. [00:19:04] Whatever learnings that you got for task number one, that is classical piano, you can basically pull out and apply a great deal of that stuff. [00:19:13] While you are learning second task, that is jazz piano. [00:19:18] Thirdly, let us say your professor has taught you quite a bit of linear algebra, mathematics, and statistics, so on and so forth. [00:19:24] Now, you have learned all these things. Now, for machine learning, you don't have to start from zero. You already know probability theory, you just… you know so much about graphs and statistics and mean, median, mode. [00:19:34] you know so much about mathematics, you can just directly take it and implement to task number 2. [00:19:39] This is how, basically, human beings learn. Unfortunately, machines do not follow the same process. [00:19:45] In the case of machines, what happens is. Task number one, it has learned, it has performed. [00:19:51] But if you give it the second task, the machine, which is dumb, dumb in the sense it does not know, basically, it says. [00:19:58] Most let us start from zero. You teach me from the beginning. [00:20:01] Basically, how to perform task number 2. Which means what… there is a lot of redundant. [00:20:06] tedious exercise on your part, because you have to supply the data, you have to rebuild the model, you have to train everything from zero. [00:20:14] Which makes your task as a trainer very, very difficult. [00:20:18] So, the way human beings learn tasks is, basically, we carry forward a learning from one task to another. [00:20:25] In the case of machine learning, unfortunately, it is the opposite, which means, basically, that it is disconnected, right? So this is connected to another problem here, that is, when we talk about transfer learning and systems, basically, uh, this is a step when your Andrew NG, basically, he said that this will be revolutionizing, or this is a big step. [00:20:45] In commercial success, what he was trying to say is, basically, this is a big, big progress. [00:20:52] towards what we are trying to achieve in the field of artificial intelligence. [00:20:55] Which is known as artificial general intelligence, AGI. Agi basically means that you train a model on one task. [00:21:04] use the learning for a wide variety of tasks. [00:21:07] It's learning, its knowledge need not be confined to one particular activity. [00:21:12] There may be 10, 15, or 20 separate activities wherein you would like to implement the model. [00:21:18] Have we reached a stage, uh, wherein we can do that? The answer is no. [00:21:23] But transfer learning may have a lot of ability to drive us to, uh, to drive us in that direction from artificial narrow intelligence. [00:21:31] Wherein you have trained a model on one specific task, and it's able to perform on that particular task itself. [00:21:37] to an area of artificial general intelligence, so that bridge. [00:21:42] Which bridges, that bridge which connects artificial narrow intelligence to AGI. [00:21:47] A lot of people believe is transfer learning, right? [00:21:50] So, uh, this NIPS, when I say NIPS, it is nothing but neural information processing system. [00:21:56] From 1995, basically, they've been using… they've been conducting different workshops, right, uh, on learning to learn, right? [00:22:05] this knowledge consolidation and transfer in the inductive system, this could be a good. [00:22:11] Beginning point for you guys. Now, we are saying transfer learning, but in many literature, in many books or blogs, basically, instead of using transfer learning, people may use the expression learning to learn. [00:22:23] or knowledge consolidation, or inductive transfer. Don't worry, it all basically refers to the same thing, transfer learning. [00:22:31] Now, as I mentioned, basically, uh, there's a beautiful book, Grace, which is known as. [00:22:36] Deep learning. This is a book. This is written by another, uh, great, uh, icon in the field of deep learning by name Goodfellow, right? The author is Goodfellow. [00:22:45] Wherein he basically says, a situation where, or what has been learned in one setting. [00:22:53] is exploited to improve the generalization in other settings. So, this is a good definition and such things. [00:22:58] This is a good starting point where you can pick up the threads for your transfer learning. [00:23:05] Now, one problem with machine learning model, uh, is that, no doubt it has a lot of advantages, guys. [00:23:13] But it has its own set of disadvantages. That is, most models which solve any nonlinear data or any complex problem, noisy data. [00:23:20] They need a of a lot of data. Correct, that is one point, basically, which is not appreciated much. [00:23:27] Any machine learning model, basically, we, you know. In our fraternity, we see they're data hungry. They need as much data as possible. I can't put a number. [00:23:39] Is 100 enough? No. Is 200 enough? If it works for you, you're lucky. Many times it might not work. Is 1,000 enough? [00:23:46] God knows, we do not know. 10,000 may be good enough. [00:23:50] But the problem with most of these machine learning models is that it needs… it consumes a whole lot of data. [00:23:57] And the problem that we as data scientists face is basically. [00:24:02] getting so much of data. Particularly label data, getting data itself is difficult. You say, boss for supervised learning, basically, I need label data. That is one more headache. [00:24:14] And if I have to label, basically, I need 6 people, basically, who can look at the image and put a label against it. [00:24:20] I have to spend additional money on it. So, getting data, getting labeled data, basically, is a big, big. [00:24:27] task, it requires considerable time and effort. uh, you know, to even prepare the data. Forget the model. Model comes later. [00:24:35] But preparing the data, getting the label data itself is basically a pain. [00:24:41] So these are all some of the challenges that we encounter, for which, basically, your transfer learning may have a. [00:24:47] Now, I'm showing you a slight increase. Well, I'm just trying to impress upon you that there is an ocean, when I say ocean, this is one of the favorite data sets. It is called as ImageNet dataset. It's a very, very popular dataset. [00:25:01] You may ask me, sir, what is so special about this dataset? [00:25:05] Have a look at this. This dataset is already available. Anybody can go ahead and use it. [00:25:10] And the beauty of this dataset is that. It is connected to the earlier point that I was making. [00:25:15] that we are struggling to have a whole lot of data. [00:25:19] I said we are struggling to have a whole lot of data. This. [00:25:23] Uh, to a large extent, 90-95% of our headache is reduced. [00:25:27] Because of this imaginative data. Why, sir? See, in your classroom session, when you basically perform any lab activity and such things, you may be doing a binary class problem, fraud versus non-fraud, or a multi-class problem. [00:25:42] wherein you have settles of our, uh. What's the color, Virginica? Three classes, that is what we do. [00:25:47] But the beauty of this particular dataset, ImageNet, is that they have already given to you. [00:25:53] On a platter they've given to you, 1,000 object classes. [00:25:58] Not one or two, but 1,000. Just as your binary classes. [00:26:01] These people have done all the hard work, and they have created their own database wherein you have 1,000 object classes. [00:26:07] And they're all for images, which means you can't do text classification and such things. So, uh, this is your go-to dataset for most of the transfer learning tasks. [00:26:16] So, in the images, basically, 1.2 million datasets, images, sorry, they have provided for training, and 100,000 for the test. So they have… we have a rich set of data. [00:26:28] Now, uh, possibly it's not… possibly it's a bit difficult for me to, uh, you know, classify or tell you all the 1,000 images, but at a high level, I can just tell you. [00:26:38] what all images they have. They have images about mites. [00:26:42] Within this might please appreciate the fact that there are different types of mites, you know? You can have black widow spider, cockroach, tick, starfish. [00:26:49] They've collected these images, and they have. Given this, then you have container ship. You can see here, under container ship, basically, you have lifeboat, amphibian, fireboat, drilling platform, all of these different types. Then you have motor scooter, leopard. [00:27:04] Within this leopard, if you want a Jaguar, or a cheetah, or a snow leopard, or Egyptian cat, you have all these kinds of image. Then you have grill. [00:27:12] Then you have mushroom, you have cherry, you have Madagascar cat, you can see a squirrel, monkey, spider monkey. [00:27:18] I don't know, I don't even know what are the TT and INRI and Howler Monkey, I think different, uh, you know, species of monkeys, I'm assuming, I guess, right? Or cat, whatever. [00:27:27] So, like this, basically, you have 1,000 classes. Now, I'll just show you a snapshot. [00:27:33] So that tomorrow, if your manager asks you, boss, build a model. [00:27:38] you do not have to start from the scratch. Why? Because the. [00:27:42] Problem of shortage of data or lack of data is addressed. [00:27:46] Have a look at this. This data, ImageNet, it has data of all the animals here, from mammals, birds, reptiles, fish, amphibians, insects, almost everything. Man-made artifacts are there. It could be furniture, instruments, electronic devices. Again, you have all of these things. [00:28:02] Some of the examples I'm giving you, like cars or airplanes or. [00:28:08] uh, chairs, whatever. Then you have different scenes if you are into nature, you know, it could be about, uh, nature or environment, mountains, beaches, bedrooms, so on and so forth. [00:28:16] People and their body parts, if you're doing some facial emotion detection or body language classification, so on and so forth. [00:28:23] If you're trying to find out whether people are happy, smiling, sad, depressed, whatever it is. [00:28:28] Then you can use these things. You can see people working in different professions. [00:28:35] Their hands, their faces, these pictures are given. food, different food and everyday items, structures of buildings and plants. [00:28:43] So, uh, in one slide, possibly, I cannot give you a thousand different images, but this gives you some kind of an idea. [00:28:50] As to how comprehensive this particular data piece is. There are similar databases as well, apart from ImageNet, but this is one popular. [00:28:58] Uh, one popular. Uh, data, uh, piece. [00:29:02] Now, why is this important? Now, tomorrow, if you are building a model, as I said. [00:29:07] And you can just compare your task, which your manager has given to some of the existing objects here. [00:29:14] Uh, I'm 100% sure that 99% of the times. [00:29:18] the task that you are doing will fall into one of these categories. [00:29:23] Or, uh, there are other categories as well. Just take this as indicative, this slide, not exhaustive, right? [00:29:28] So, uh, if your task basically, you know. somebody may ask you to, you know, identify between, let's say you're doing a project on wildlife conservation, and you have to basically identify the number of tigers or number of elephants. [00:29:43] And you know, basically, under the animals category, they already have images of dogs, cats, elephants, and such things. [00:29:51] So you can basically use this dataset, and the algorithms that come from this. [00:29:55] For your specific task. Now, there may be another task, right, which may be about images of extraterrestrial bodies, or let's say, Jupiter, or it could be about planet Jupiter, or Moon. [00:30:09] Right? Then, basically, you can just compare, right? I'm not saying it is not there. [00:30:14] just go through the ImageNet, and if you're not able to find anything which is remotely close to. [00:30:19] the task that you have, uh, for, uh, that you have in hand, then basically this ImageNet dataset might not be suitable. For all practical purposes, 99.99% of the time. [00:30:31] This data set, this database, is adequate. This solves a big headache because our problem of shortage of data is addressed. [00:30:40] And they have taken the trouble of annotating. Annotating, in a sense, against each, you may have an image. [00:30:47] But when you feed it to a machine learning model for classification, you need to annotate it. Annotate means you need to put a label. They have already done this. [00:30:54] So, you'll be saving a lot of time, you'll be saving a lot of effort, you'll be saving a lot of energy, basically. [00:31:01] by working on this. Now, this is not transfer learning, but this is the foundation of transfer learning, that's what I'm trying to tell you. Just have a look at this. Now, 14 million images as per 2017. I do not know if there is any additional release. [00:31:14] Because from time to time, they keep updating it. I have not checked it. So, last time when I checked, basically. [00:31:20] There are almost 14 million images. Images are hand annotated and categorized, so this solves a lot of your problems, basically. And you can see here there's a wide variety of categories, basically, that they have taken, right? Now. [00:31:36] Based on this ImageNet dataset, they have recreated, they have tried to recreate. [00:31:40] Another data set, which is called as IL, SVRC, which is known as ImageNet. [00:31:46] Large-scale visual recognition challenge, correct? You can consider this as a subset of ImageNet. [00:31:53] Now, this guy contains 1.2 million training images, 50,000 validation images. [00:31:59] And 100,000 test images across 1,000 object categories, correct? [00:32:04] This challenged, pushed forward the development of deep learning and CNNs. Particularly, there is a transfer learning technique which is called as AlexNet. [00:32:13] Which was introduced in the year 2012, right? Almost 13 years back, this algorithm came into existence. [00:32:20] What we are trying to say with this slide is that this transfer learning technique, namely AlexNet. [00:32:26] Whose foundation is CNN was trained on ILSRVC, and this ILSRVC dataset is nothing but a subset of ImageNet, right? [00:32:35] So, if you want the credibility, sir, you're talking about some transfer learning algorithm. [00:32:42] Can you tell me, basically, what is this transfer learning? Is there… why should I trust transfer learning? It's a good question. [00:32:48] Why should you trust? Because anybody can, you know. [00:32:52] Uh, come up with any algorithm. So, it's always good to know. [00:32:57] How was this algorithm developed? on what dataset have they trained. [00:33:01] Uh, and is this basically relevant to your task? [00:33:04] Now that we know that AlexNet has been trained on ImageNet. [00:33:08] By and large, you know, it has been… you can be rest assured, you can… you can rest assured that. [00:33:13] Uh, you know, it is an algorithm, basically, which has learned. [00:33:17] quite well to detect all of these categories that you see. Animals, objects, scenes, so on and so forth. If there is a class outside. [00:33:26] From the database, then basically you may not want to use AlexNet, because AlexNet model has not been trained for that specific task, apart from these seven or eight categories which I have. [00:33:38] are talking about, okay? No, uh, now, existing challenges, guys. Now, these are the existing challenges which makes us. [00:33:47] use transfer learning. See, getting such a data set, when I say such a dataset, I'm referring to the mother of all the datasets, which is ImageNet. [00:33:56] Right, which is our go-to. Like, when you talk about physics. [00:34:00] You cannot, uh, you cannot avoid mentioning about Newton or Einstein. They're, uh, the absolute stars. When you talk about cricket, you'll obviously refer to Sachinton, right? [00:34:09] The same way, when you talk about transfer learning, you cannot have a session on transfer learning without talking about ImageNet, AlexNet, so on and so forth. [00:34:17] The problem is this, guys. Can you get such a data set in every domain? [00:34:24] Right? I've shown you general features like your cat, dogs, and elephants, and such things. Tomorrow, if you say, sir, show me something in marketing. [00:34:31] Uh, merchandise, how is… how is Walmart, basically? How has Walmart basically in their aisles, stored the items? [00:34:37] then your ImageNet might not have, uh, might not have, uh, specific images related to that. [00:34:43] Correct. Uh, in deep oceanography, or about some, uh, about some niche area, uh, you know, you might, uh, you might want, uh, boat, you might want, uh, images of some specific animals. [00:34:55] under the water aquatic animals, then ImageNet might not give you the data set in every domain. So here is the main point. [00:35:05] Domain-specific data is a bit difficult to obtain, domain, legal domain is a separate domain. Marketing is a separate domain. Sales is a separate domain. [00:35:15] fashion and such things, basically, they're a very, very separate domain. Uh, then you may have automobiles and such things, or, you know, manufacturing is a separate domain. [00:35:23] Uh, if you ask me 10,000 images about how copper. [00:35:27] uh, copper is basically extracted from copper ore, or iron is extracted from hematite. I may not have… when I say I. [00:35:35] There may not be a dataset tailored to that specific area. So getting a domain-specific dataset is very, very tough. [00:35:42] Second one is, you know, there's a problem called as hyper-specialization. Hyper-specialization means what? [00:35:48] Hyper-specialization means, you know. very, very niche area. [00:35:53] domain-specific, task-specific, specific dataset. Basically, if you give me. [00:35:59] And then, basically, you use any of the transfer learning technique, basically, your performance will degrade. [00:36:05] Because we are talking about two completely different areas. But most of the requirements that we get in future, we may get. [00:36:14] Basically, is, you know, hyper-specialization. This is the area, and I want you to build a machine learning model. [00:36:22] The problem is, most of the people do not understand. [00:36:23] Because algorithm is secondary. Data is primary. If I have… if I don't have the relevant data, what will I do? [00:36:30] Then the next thing is basically people may ask 100 samples or 200 samples you may get. [00:36:35] The problem, you know, with the 100 samples, when you have 100 samples is… you are going to split to 100 data, 100 sample points, basically, into training and testing. [00:36:45] training, you'll say 70%, testing is 20, uh, whatever, 30%. [00:36:52] Which means, basically, from 100, the sample size is reduced to 70, only the 70 cases, basically, you're feeding. [00:36:57] into the model. So, by the time the model is trained, you know, the data size basically is becoming lesser and lesser. [00:37:08] That is a problem, correct? So, getting hyper-specialization for hyper-specialization tasks and such things, developing new and new models becomes very, very difficult. [00:37:17] The solution, basically, we say, goes beyond specific tasks and domain. Go back to the second or the third slide that I spoke about. [00:37:25] We are in an effort. When I say we, the data science community is making a very, very strong pitch and effort. [00:37:30] to move from the area, current area, current focus is artificial narrow intelligence. [00:37:37] We are moving from artificial narrow intelligence to an area which is called as AGI, or artificial General Intelligence. [00:37:43] So, what we are trying to do is, basically, we are trying to leverage or exploit or use. [00:37:50] the knowledge from pre-trained models. Now, this is an expression which I want you to keep in mind. [00:37:56] We are trying to use the knowledge from a pre-trained model and use it to solve new problems. This pre-trained model. [00:38:05] is at the heart of your, uh, transfer learning. Pre-trained model, I'll just explain in the coming slides. [00:38:11] Now, it's like, there are two ways of cooking food. One is, basically, you get the rice, you get water, you get vegetables, and from the scratch, basically, you're cooking rice. [00:38:21] Second one is, basically, if you go to any of these grocery shops, you know, they… we have this MTR. [00:38:26] Right? Ready-made stuff we have, wherein almost everything is made, and 2 minutes, basically, if I just, uh… boil it or heat it, basically, my KHD or it may not be kitsi, but here we get this local South Indian dishes. [00:38:39] In 2 minutes, basically, it's ready, right? So this pre-trained models like this, somebody has already trained everything. [00:38:46] Just as somebody has prepared the ingredients, everything, and all that I need to do is boil it for 2 minutes. [00:38:51] Somebody has taken the trouble of, uh, of. making these pre-trained models, and there are a wide variety of beautiful models that you can go ahead and use. [00:39:02] You are basically going to take it. And, by and large, with slight customization, basically, you can adapt it. [00:39:09] to the specific problem. Why? Because hyper-specialization is difficult. [00:39:13] Getting data set is difficult. We are living in a world wherein we have shortage of data. [00:39:19] Data is anyway difficult. What components this problem is the fact that we have. [00:39:24] shortage of annotated dataset. Uh, the solution for all of these things. [00:39:29] is in an area which is called as. pre-trained models, okay? We'll talk more about this, uh, in the coming slides. I'll show you a few examples as well, right? [00:39:39] So I've so far spoken about the motivation behind transfer learning. Now, we'll just, you know, go one step further and look at. [00:39:48] the, uh, try to get some kind of understanding about, uh. [00:39:52] you know, transfer learning, right? We'll try to understand the different elements of transfer learning, right? [00:39:57] Okay, now, what is transfer learning? By now, you might have understood that. [00:40:02] It is machine learning, it is not one single machine learning, it is an umbrella term that we use. [00:40:08] Uh, right wherein you have, uh… I don't know, maybe hundreds of algorithms that are present. It refers to reusing a pre-trained model. [00:40:18] So somebody has developed a pre-trained model. I don't have to reinvent the wheel, I'm just taking the wheel. [00:40:24] And I'm just using it to develop my own vehicle, right? Instead of a car, I'll have some other different kind of a structure. [00:40:31] And I'll give it my own name. So take a pre-trained model, reuse. [00:40:36] it to improve the predictions on a new task. [00:40:39] For example, there may have been a model that somebody has trained. [00:40:44] on backpack. This original model, somebody has built an XYZ model that is used to train. [00:40:50] Backpack. Now, see. traditional ML approach is what? Traditional ML approach is basically, okay, the models. [00:40:59] Uh, the model's goal mission is over here, because you have built some model which is able to recognize. [00:41:04] Backpack. Now, our problem is basically understood. You have built a model for backpack. [00:41:10] Can you use to predict tomorrow if you give a bunch of sunglasses, a few sunglasses. [00:41:15] Can I… can that model basically be used to predict sunglasses? The answer is yes, with the concept of transfer learning. [00:41:23] You can transfer the learning that the model obtains while learning backpacks. [00:41:29] to extrapolating its utility to learn, uh, sunglasses or any other object, right? [00:41:35] We'll see this. I'm just drawing a comparison here between the traditional ML approach. [00:41:39] And this is your transfer learning approach. You can have a difference here. [00:41:44] Can you see this, Grace? Can you see here? What am I trying to do here? [00:41:47] In the traditional ML approach. We say that it's, uh, Vinity, just give me 2 seconds, 30 seconds, I'll come back to you. Just give me 30 seconds, please, okay? [00:41:56] I'll come to you. I'll just finish off this slide, otherwise I'll forget what I have in mind, okay? [00:42:00] See, in traditional ML. The learning that these machine learning… this machine learning algorithm has, we say that it is isolated. [00:42:11] I repeat, it is isolated. And it is useful for. [00:42:17] single-task learning, not multitask learning. I repeat this point. In the case of your traditional model, right, your SVM or your. [00:42:25] whatever model, you know, your addition to your regression model, isolated. [00:42:29] single-task learning. Now, knowledge is not retained or accumulated. Please underline these words. [00:42:38] Yeah, in your memory, knowledge is not retained. Or accumulated. Learning is performed without considering past learned knowledge in other tasks. Have a look at this. You have one data set. [00:42:49] You have learned it. The model is fine. But what about the learning? Are you storing it? Are you accumulating it? The answer is no. [00:42:56] Second data set, second task. So there is no connection at all between first dataset and second dataset. [00:43:02] From a human point of view, it may appear very stupid, right? If I were to go to a driving class, learn bike. [00:43:09] For 3 months, I'm getting good with this. Now, if I have to learn car, if he has to train me from the scratch, and I'm, you know, acting as if I, you know. [00:43:17] bike learning and car learning, basically, are two separate activities. [00:43:22] Then, basically, we may laugh. But this is from the human point of view. [00:43:25] But from the machine point of view, basically, that is what happens, basically. Their learning is isolated, and it is single-task learning. [00:43:33] With transfer learning, basically, once a system has learned to do a particular task, basically. [00:43:39] We are looking to transfer the knowledge on another task. [00:43:43] Now, I want to draw your attention to this word, knowledge. [00:43:47] Correct? Knowledge in this context, this context means in this session of transfer learning. [00:43:53] The word knowledge means what? you're trying to… knowledge has two things. Features, features or columns. [00:44:00] And the second one is wheats. Can the wheats that I have learned. [00:44:05] from one algorithm be trans… can be… can it be, uh, can it be used for another task? [00:44:10] Can the features that I obtained from one task be extrapolated or used for another task? [00:44:16] That is what I mean by knowledge. Vinit, I think you had a question. Sorry, I'm sorry to keep you holding. [00:44:20] No, no, that's fine. Uh, so, look, uh, the previous slide that you showed, right, where, uh, the bag is getting, you know, [00:44:26] I would like to use it to… I don't know, recognize sunglasses or something. So that is just a… [00:44:30] Do you think that this is something that's already in place? [00:44:31] Yeah. This is an example. [00:44:35] Okay, so… [00:44:36] This is just an example, yeah. [00:44:37] Okay, got it. So, on a real-time basis, is transfer learning still a theoretical concept, or do we already have something that is happening in this space? [00:44:47] There are wide variety of examples for transfer learning. [00:44:49] Oh, okay. [00:44:50] implementation, yeah, there are many, many implementation, and there are so many beautiful algorithms. They have used this to solve many interesting cases. [00:44:58] You're gonna pick them on one of these, I don't know, examples in the future? [00:45:01] Yes, yes, yes, 3 examples I'll give you before the end of this session. [00:45:04] Um, I think one point… [00:45:07] No problem. Yes, Deepak? Yes. [00:45:08] This is Gunjan. Uh, what I can say is that, uh, can we say in the simple form, [00:45:11] Because all large language model is kind of a transfer learning. [00:45:14] Because it is already trained in getting somewhere trained, and it's simply using it. [00:45:18] for reasoning and everything. Can I say that again? [00:45:21] Yeah, yes, yes. Yeah, you can, uh, call it as large language. You can consider most of these large language model as an outcome of transfer learning itself. [00:45:33] Because you build the model, basically, and you apply it in different contexts. [00:45:36] Yes. [00:45:42] Okay. Deepak, I think you had a question. [00:45:48] Yes. Yes. [00:45:49] Yeah, so I've shared it on the chat as well. So… I guess in the transfer learning, we have a pre-trained data set, and suppose we have our own data set, so how to align these datasets? Because there would be a different, uh. [00:45:59] You know, features, or there are a few things which is not. [00:46:04] I'll tell you, I'll tell you, you're right, I understood your question, but we don't have a pre… we anyway have a pre-trained data set. [00:46:05] Aligns, yeah. [00:46:10] But more than using the pre-trained dataset, we are looking to use the pre-trained model. [00:46:17] It is the model that we are trying to implement, not really the data center. [00:46:18] Perfect. [00:46:24] I'll answer your question in the coming slides, okay? [00:46:25] Okay. Yeah, sure. [00:46:26] The whole part, okay. Just try to understand this, guys. I'm just showing you a slide. Uh, I'm just trying to go from a 10,000 feet perspective to a 10 feet perspective now. [00:46:36] Please understand, uh, this case. See, typically in a computer vision, right, which means basically all these image classification and such kind of problems. [00:46:45] Now, you may have an architecture like this, correct? You have a pre-trained model in the sense that we have input. [00:46:51] And then we have a series of little layers, and they learn something and give you the output. [00:46:56] Correct? This is the output. Now, this is what you and I basically see. [00:47:02] Correct. But what we have to understand is we have to break down the hidden layers, the role of the hidden layers need to be. [00:47:08] broken down, right? When I say the role of the hidden layers have to be broken down. [00:47:13] What do I mean, right? See, typically, when you look at any of the deep learning model, this is the input, the very first hidden layer. [00:47:22] I hope you can see here as a representation. [00:47:25] Now, what is the task of this fellow here? [00:47:29] The first hidden layer, please understand, this is the most crucial and very, very interesting, you know, I like this concept very much. [00:47:37] The first hidden layer, basically, you know, what it does, basically. [00:47:42] It tries to learn. All the low-level features. I repeat, it tries to learn the low-level features. [00:47:50] You must be, sir, what are these low-level features? [00:47:51] The meaning of low-level features here is that it tries to detect the edges of an image. [00:47:58] Correct. The edges are basically nothing but the basic building block of visual features, correct? [00:48:04] Sometimes, you know, it may try to learn the lines and the corners. [00:48:08] You know, it tries to detect the lines, corners, and other simple shapes is what it tries to. [00:48:14] This is as far as the early layers are concerned, early hidden layers. [00:48:18] Now, as you go through, let's say these are the middle levels, let's say the fourth hidden layer, or the fifth hidden layer. [00:48:25] This, I repeat. The first fiddle layer basically learned the low-level features. [00:48:32] The middle layers, basically. They try to learn water. Their job is different. They try to learn. [00:48:39] The textures and the patterns. Many times, they learn the simple shapes. [00:48:45] Correct, whether the sheep is rectangular, person's face is oval, or it is basically, uh, you know, some other object, like, let's say, watermelon. [00:48:53] Yeah, it could be circles, squares, triangles, so on and so forth. [00:48:57] So the middle-level layers, basically, are trying to learn your shapes and such things. [00:49:03] And the later layers, by the time you come here, it could be the 18th layer or 19th layer, or the 8th layer, depending upon which model you're talking about. [00:49:11] They have a different task. Now, what is their task? [00:49:14] Their task is to basically learn to detect the object parts, such as. [00:49:19] wheels, faces. Or body parts. [00:49:23] Correct. So the final layers of a neural network typically. [00:49:28] They are specialized in learning the objects, the scenes, the dogs, cars, and. [00:49:33] cars, or let's say, buildings. Now, uh, I'll just show you one of these slides, basically. I mean, slide number 14. Maybe you can understand this better if I show you. [00:49:45] One of these, uh, pictures. Can you see this, guys, everybody? [00:49:46] Okay, thanks, Mitun. [00:49:52] Yes. [00:49:53] Are you able to see this slide? I'm just showing you the images, correct? No, we see the images. See, this is the image, let's say. It could be anybody. It could be a Bollywood star, Hollywood star, or an actor, or a sportsman, or any celebrity. [00:50:04] But you and I can basically understand, because we have a human mind, right? [00:50:09] But when you take thousands of these ships. pictures, basically, how does a deep neural network process it? [00:50:18] How does a deep neural network. Remember this word. [00:50:23] Deep neural network learns hierarchical feature representation. The work… the hierarchical is important, which means. [00:50:30] You are taking these 10,000 images and feeding it into the input layer. Once you basically feed this, you have, let's say. [00:50:38] Here, I'm just showing a simple example wherein you have 3 hidden layers. [00:50:41] The first hidden layer basically learns all of these things. You can see here. [00:50:45] some basic small shapes, edges, lines, circles, and such things. [00:50:50] what we call as low-level features is what it tries to learn. Nothing more than that. You can't expect the first hidden layer to do, uh, you know, big tasks and such things. [00:51:00] very, very low-level basic features is what it learns. [00:51:02] You may have multiple hidden layers, but by the time you come to the middle portion, basically, the middle hidden layers. [00:51:08] They're able to recognize a person's eyebrows, eyes, eyelashes, a person's lips, a person's nose, a person's earlobe, and such things. [00:51:18] Which means it is able to recognize some simple shapes, such as circles, squares, and triangles. But by the time you come to the third or the final few hidden layers. [00:51:27] They're able to recognize the object, like dogs. carve buildings, so on and so forth. Once you recognize this, basically. [00:51:37] Then you supply a new image, basically, it's able to go through the process, and it's able to give you the output. [00:51:43] So this is how, basically, the learning is basically divided. [00:51:47] amongst the different hidden layers. Remember this golden phrase. [00:51:52] that deep neural network learns. hierarchical, hierarchical means from top down. [00:51:59] Low level, mid-level features, and high-level features. Now, this is important because I'll tell you why this is important. Deepak, you had a question? [00:52:07] Yeah, so what does a layer mean in the technical context? [00:52:11] a set of nodes, basically. In a neural network, you have set of nodes, right? That is what is meant by layer. [00:52:17] Okay, and these notes have some sort of attributes of the image. [00:52:21] Yes, these notes, basically, are the part of the architecture of neural network. [00:52:27] Where, upon training, basically, it will learn some weights and such things over a period of time. [00:52:33] neural network, basically, it tries to learn some. Uh… what shall I say, weeds and cystics. [00:52:42] Okay. [00:52:47] Okay, uh, okay, so, uh, at a very high level, guys, this is what happens. [00:52:52] Let's take a look at the steps… what are the steps that we follow while training, while doing a transfer learning? [00:52:57] In the first step, basically. Correct. [00:53:02] Sorry, let me just go one step back. I think I missed… I think I've covered this, right? I was at this stage, yes. [00:53:08] So these are the common layers. Pre-trained, input, common layers, output. This is for identifying the. [00:53:14] Backpacks. Now, what we are doing is, basically, we are taking the same model. [00:53:20] Right? I've told you the initial level. mid-level, and basically the final few layers. [00:53:27] What we are doing is low-level features, which are used to extract the lines, color, those sort of things, basically, low-level features, basically. We are not touching. [00:53:35] The mid-level features also, by and large, we are not touching. [00:53:39] But the final 2 or 3 layers, basically, we can adapt to. [00:53:43] suit my requirement. So, we call this as the process of freeing and unfreezing, which means. [00:53:49] 70% of this hidden layer, basically, 70% to 80%, I'm just giving some number. [00:53:55] We are keeping as it is. Let it learn to recognize the shape of an object based on the backpack example. [00:54:03] Or the form and such things. The last 20% of the hidden layer, basically, I'm freezing. [00:54:09] So that, if I wanted to learn the, uh, learn to recognize sunglass or any other object, basically. [00:54:14] It is able to do it. So I'm just doing, uh, doing… a bit of customization and adaptation to suit my purpose, rather than rebuilding the model from the. [00:54:26] Scotch. That's what I'm trying to do. So, what does this achieve? See, transfer learning should be used when you have. [00:54:33] typically shortage of data. And then, basically, if you want to get something done quickly, that's when basically you have to do, right? [00:54:42] So it serves two purposes. One is faster training, because you're not training the model from the scratch. [00:54:48] And secondly, it also serves the purpose of basically efficient usage of data. Vinit Singh and Vir Singh, you have a doubt? [00:54:57] Uh, yes, madam. So, uh, basically what I'm thinking is… Uh, we haven't really, uh, studied about neural networks yet, so is it wise to actually go into transfer learning without knowing. [00:55:10] the actual concepts of what a layer is, what a node is, and like, how everything works there. [00:55:12] Okay, see, uh, just give me one moment here, right? [00:55:21] Just give me one moment. [00:55:31] I'm just showing you one simple schematic representation, just to jog your memory, correct? [00:55:35] are able to see this? [00:55:38] Hmm, yes, but my point is that, uh… In our main curriculum, I think neural networks will come at, like. [00:55:47] I think a few weeks from now. Uh, we are still at class today. [00:55:50] So, um… [00:55:51] Yes. Yes, so this transfer learning part is not specific to neural network. You can use this transfer learning for anything. [00:55:58] So it is not necessary that you should always learn neural network. [00:56:00] At a basic level, basically, if you understand, you know, how any algorithm works, basically, you can still. [00:56:07] be able to connect transfer learning. You don't have to wait for neural network assets. [00:56:09] Oh. Okay, alright, I don't do it. [00:56:14] But still, it would be good if you get, like, an understanding. [00:56:15] Okay, yes. Yes, yes, yes, it would, uh, it would always help. [00:56:16] Yes, yes, we can see. [00:56:21] Yes, yes. Uh, Vir Singh, you had a question? [00:56:26] With it, yes, please, yes. [00:56:27] So, in the previous slide, you showed, right, like, it can learn from already, uh, so it is going layer by layer, right? So, in what… I mean, okay, can you go to that slide 15, or I guess maybe the previous one, or something? [00:56:33] Yes, yes, yes. [00:56:39] This one? [00:56:40] So, say, for example, I guess you mentioned something like, uh, maybe I use that backpack as an example, okay? So, it's learned something, and then I can utilize it to train my new model. [00:56:49] So, how can you… how can we know… [00:56:51] what has it learned at what layer, and how am I going to reuse it? [00:56:56] Oh, yeah, how, uh, or in other words, basically, can I say at what stage should you fine-tune it? [00:56:59] Exactly, exactly. That's what I mean. [00:57:03] Yes, yes, understood. So, there is a separate slide, I'll come to that. There is a separate slide. [00:57:09] Okay, thank you. [00:57:11] I need to. [00:57:12] Which gives you the best practices of fine-tuning. So, so far, are we… are you with me, guys? Are you able to understand the gist of what we are seeing? [00:57:15] Yes. [00:57:16] Yeah, I have one now, yeah, I have a question. [00:57:17] somebody had a question? Please ask me, please ask me, yes. Nero. [00:57:19] So, uh, do we identify, uh, [00:57:24] or let's say when I'm trying to, uh, taking on this example, or picking on this example. [00:57:27] Uh, if I'm trying to kind of model for, uh, [00:57:31] classify… classifying a backpack, or… [00:57:34] of that sort. So, do I kind of pre-identify that this model can be [00:57:40] reused, uh, uh, with, uh, reused, or, uh, for transfer learning, or, uh, will be reused for identifying sunglasses as well. [00:57:50] So, do I kind of do something differently while building the model? [00:57:54] That is first, and second is, uh… [00:57:57] why, let's say I have a kind of a… [00:57:59] Uh, identification of sunglasses. So, how do I choose that whether I'll use the backpack model for my transfer learning? [00:58:10] Okay, see, there are class of models, basically. So, typically, uh, you can try with any of these pre-trained models. [00:58:19] So, as a starting point, correct? There is a good algorithm which is called as AlexNet. [00:58:25] AlexNet is like the grandfather of all of these, uh, you know, transfer learning models. You start with AlexNet model. [00:58:31] And build a quick and dirty model. on the new object classification, which is your sunglasses. [00:58:37] So let us say you build a quick and dirty model, and it gives you only 30% accuracy, which means that AlexNet is actually not working for your data set. [00:58:44] Correct. So, instead of AlexNet, there are a host of other models which we'll be discussing. [00:58:50] Later, there are 10 or 12 models, basically, which you can use for different cases. [00:58:55] Now, let's say in AlexNet or ResNet, typically these are very powerful models. Just for the discussion purpose, I said 30%. [00:59:02] But when you use any of these models, basically. [00:59:05] You can easily expect 70-80% accuracy. Just like that, in the first attempt itself. [00:59:15] Okay, so popular… popularly for your question, just try… two or three things. One is called as AlexNet. [00:59:23] Second one is called as VGG. VGG, Visual Geometry Group. [00:59:28] Any of these three models typically would give you good, accurate results as compared to many of your traditional models. [00:59:29] Okay, thanks. [00:59:38] Okay, okay. covered this, okay. As a general, right, what should you… Uh, to… what are the steps that you need to follow while doing a transfer learning? This is bottom-up, right? So this is step number one, which I've written. [00:59:52] Then 2, then 3, and then 4. Typically, you train a model to reuse it. [00:59:59] Correct? You train a model. And have it at the back of your mind that it is not for one purpose, it might… I may need to generalize it. [01:00:07] So you train a base model, which is also called as a foundation model. [01:00:11] Now, in step two, basically, what you do is, the model that you had built in step number one, which is called as a pre-trained model. [01:00:18] that has already been trained. on a large data set for a specific task. [01:00:23] That, basically, we are going to use as a pre-trained model, instead of rebuilding the model from a scratch. [01:00:29] We are going to use this. Now, step number 3 is you can extract the features. [01:00:35] And I say extract the features, I was just not speaking about how to extract the low-level features. [01:00:41] the mid-level features and the high-level features. So this is… feature extraction is one of the main goals or tasks. [01:00:48] Transfer learning. If you can extract features. from the pre-trained model, that's a big win for you, right? So that is one of the tasks that you are transfer learning. [01:00:58] accomplishes. The fourth one is basically extraction of features in any. [01:01:04] order, which means, typically, we are just giving the example of neural network because it is in the form of a diagram. People understand it very easily. [01:01:14] So, therefore, we have set neural network, even otherwise it works. [01:01:17] No, once you extract the features, basically, you can apply this on a different scenario for your particular task. [01:01:24] So this is how, basically, we are going to use transfer learning. [01:01:29] Four steps, okay? Okay. Now, some examples you give me, right? Again, I'm just giving you 3 or 4 examples. There are many more examples of this. [01:01:40] And I've created exhaustive slides in the end, basically, okay? [01:01:44] So there is… from Google, Google, basically, they were the ones who introduced what is called as Inception V3. I think it is version 3, because they kept. [01:01:52] refining it. So that is a very, very popular, uh… Uh, you know, uh, transfer learning technique. So, when should I use this? Now, look at this. [01:02:01] Google Inception V3 also, they've used ImageNet. which I was speaking about earlier, they've used this for… you can use this model for object recognition and detection. So if your goal is object recognition and detection. [01:02:15] highly advised model is basically Inception V3. Now, there's one more model. In fact, there are two models which are cousins of each other, right? One is called as VGG16 and VGG19. What is the 16 and 19? [01:02:29] In VGG16, you have 16 hidden layers. And in VGG19, which is a refinement, I think that took around 2 or 3 years to refine and modify VGG 16 and 19. [01:02:39] They've added 19 hidden layers, that is 3 additional hidden layers. That was also trained on ImageNet. So why should I use this VGG set of models? [01:02:49] For image classification tasks, you can go ahead and use it. [01:02:51] Then you have, uh, on the right-hand side, I've shown you examples of images. On the left-hand side, I'm showing you for. [01:02:58] text NLP tasks. See, for NLP, you do not have so many models. [01:03:03] However, one model which stands out is what is called as BERT. [01:03:07] BERT model. This is a very popular model. bi-directional encoder representation of text. [01:03:15] I think the third version is there. Here, also, if you get into each of these things, there are different flavors. [01:03:20] You may have vanilla flavor or you may have chocolate, you may have some toppings, right? [01:03:25] Today, people have taken that base model, they've done some mixing and matching, and. [01:03:29] Now, almost every other day, there is some new version, but these are the most popular versions that you can go ahead and use. [01:03:35] This is also used for your. NLP tasks, so on and so forth. [01:03:40] Then GPT, which is the engine behind your ChatGPT and such things, correct? [01:03:45] Uh, that is also one popular model that can be used as a pre-trained model, pre-training model for various NLP tasks. [01:03:53] So these 4 or 5 names you just keep in mind. [01:03:56] As you gain more confidence in such things, you can look at the last few slides of this presentation, which I'll slide. [01:04:03] which I'll share with you. It'll give you the internals of this. At this stage. [01:04:08] You just at least keep in mind the general purpose of what is transfer learning, a few examples. [01:04:14] That you just keep in mind, okay? Now, what is it that we have learned, right? We have learned about transfer learning, some examples, and such things. [01:04:23] Now, at this stage, you should be asking 3 questions. [01:04:27] So, transfer learning, all of these things are fine. [01:04:29] I'm just shifting gears from the second gear and moving to the third gear. [01:04:33] Sir, what to transfer, sir? When to transfer, and how to transfer. It just boils down to these 3 questions. [01:04:40] Correct? We are just in transfer learning, you are just basically maybe asking a simple question at the back of your mind, sir, all these theories are fine. [01:04:49] But please tell me, what the am I transferring? [01:04:52] And at what stage am I transferring? You are seeing the hidden layer, this, that, the 13th hidden layer, should I change, or 14th hidden layer? [01:05:00] Or… and then, how do I transfer? It just boils down to these three. [01:05:04] Questions. So, we'll just try to quickly explore. Uh, these 3 questions, okay? What do we transfer? [01:05:12] See, with the first question, basically, I'm asking what to transfer. [01:05:15] We are taking the knowledge… knowledge, the word knowledge basically means weights and such things, correct? [01:05:22] or the importance of a particular feature, which means nothing, it's just the importance of a particular column, uh, in determining the model. [01:05:29] We are trying to take the knowledge of a model that has already learned the shapes or the patterns or the word meanings. [01:05:39] On an earlier task. And we are applying it for the new. [01:05:42] Model. Correct? This is what you're transferring. What to transfer? The shapes you're transferring. [01:05:48] the patterns and the meaning of the words, this is what you're basically. [01:05:53] transferring. So, give me an example. Very simple example. Look at this. [01:05:58] There is a model, let us say, you've trained to recognize cats and dogs. [01:06:03] Fine. Now, the same model can be used to. [01:06:07] recognize or detect tumors. Now, you may say, sir, what is the connection between cats, dogs, and tumors? [01:06:15] Apparently, for us, for human beings, basically, there are no connections. [01:06:20] But these are objects. We are not actually transferring. [01:06:23] the learning of a cat or a dog. What are we transferring? [01:06:27] We are transferring the knowledge of the edges and the curves. Adescend the curves means what? [01:06:32] Basically, the first student layer and the middle hidden layer, which detects the edges, the patterns, the shapes. [01:06:39] That is what, basically, we are trained to learn. [01:06:42] So, apparently, cats, docs, and tumors may be very, very different. [01:06:46] Correct. It is not even… tumor is not even any an animal. [01:06:49] But we can transfer the low-level as well as the mid-level features. [01:06:54] from one model to the other model. Now, secondly, basically, we can. [01:06:59] transfer the feature representation, that is the columns, basically, learned by one popular model is there, which is called as ResNet. Resnet basically stands for residual network. [01:07:10] on ImageNet to classify medical x-rays. So, the purpose may be totally different, transfer learning basically allows you to transfer. [01:07:21] Irrespective of their tasks. So this is the first thing that you're transferring, shapes, patterns, and word meanings. [01:07:26] Question 2 is basically, sir, when to transfer? when do I transfer? [01:07:32] Typically, your transfer learning is used. When you have limited. [01:07:37] labeled data. The word labeled is very, very important. [01:07:41] Your data is, anyway, less. But it is not even labeled, basically. That's when, basically, you're struggling, right? [01:07:48] Therefore, you can use these pre-trained models. which have been developed by, you know, maybe Stanford University professors or some of these other professors, basically. [01:07:58] You are using many of these pre-trained models, which have already been trained. [01:08:03] to, uh, sort of apply in a case wherein you have limited label data. [01:08:09] Correct? I'm just giving you an example. Suppose you have 1,000 hospital images. Now, you are working, tomorrow you have become a great data science scientist, and you have given only 1,000, uh, hospital images. [01:08:21] Now, you know and I know that 1,000 hospital images, you can't expect some miracles, you can't. [01:08:26] Build a model which will do miracles for you, right? [01:08:31] So what are you doing? You are very smart. [01:08:32] How are you smarter? Because you know that. There are many, many models that somebody else has already built. [01:08:38] And you can transfer the knowledge that has been obtained. [01:08:43] from ImageNet dataset. ImageNet dataset on a lot of models that you've seen. [01:08:48] You can apply the knowledge, and you can still go ahead and extract the features and classify these 1,000 hospital images. [01:08:57] So this is one thing that you can go ahead and do. [01:09:00] Now, there is a warning. What is that warning? [01:09:03] There is something called as negative transfer. Right? Negative transfer, just… we are trying to avoid this negative transfer, correct? [01:09:13] What is this negative transverse? Sir, simply, negative transfer means when transferring knowledge makes the target task worst. [01:09:20] Correct. When you are training a model on a dog breed. [01:09:24] Let's say you're training a model on dog breed. [01:09:28] Uh, but you're trying to help it, you're trying to use it to identify your fruit. [01:09:31] And you're getting a low level of accuracy, then you can understand. [01:09:36] you have to be smart enough to understand this is a completely different task altogether. [01:09:41] it is not working. My original model was trained on dog breed recognition. Now I'm using it to recognize fruits and such things. [01:09:50] The features that the model has learned while identifying the species of dog breed. [01:09:56] Correct, is completely confusing the model. Confusing the model, and therefore, basically, it has made a complete mess while identifying a fruit. [01:10:07] This problem is called as negative transfer, correct? So, how do we know this? The accuracy and such things are very, very poor and substandard after building the model, so that's an indication. [01:10:17] Now, question number 3 is, sir, how do I transfer? Now, here, there's a very, very important concept, and please pay attention. [01:10:26] We transfer by you reusing the old model in different ways. How. [01:10:30] There are two things. One is we try to freeze. [01:10:34] And the other part of the model, we unfreeze. [01:10:37] Right? We freeze some portion of the model. We unfreeze the last layer, or typically last 2 or 3 layers. [01:10:47] Why? Remember, the last 2 or 3 layers, as I gave that example of facial features and such things. [01:10:55] They are, uh, they are doing the job of learning the overall fees. [01:11:00] Correct? So only the last layer or last two or three layers, basically, if you experiment and unfreeze for your specific task. [01:11:08] you can basically go ahead and you'll be stunned with the kind of results that you get. [01:11:13] So you freeze and unfreeze. Freeze 90%. Freeze means don't change. Low-level features, middle level features, don't. [01:11:22] While they're tampering it, unless there is a. need. Typically, the last one layer or two layers is what we are basically unfreezing. [01:11:29] So that we can get the job done on our task. So this is what. [01:11:34] This is the methodology on how to transfer. Sir, is there a formula? Can you give me a guarantee by unfreezing. [01:11:41] The last layer, there is no silver bullet here. This is an experimental process. [01:11:45] So, typically, if you unfreeze the last 2 or 3 layers, you should be able to get the job done, right? 3 or 4, max to max 4. [01:11:53] But 3 should be sufficient. Okay, now, for example, there's an NLP task wherein you've built… you're using a BERT model, or language model. [01:12:03] to train a small new layer to detect positive sentiments versus negative sentiments. [01:12:09] use an earlier trade model, which is a BERT model. [01:12:13] And only the last one or two layers, basically, you customize and you freeze it, so that it can learn the characteristics from your. [01:12:20] Uh, dataset. That is what we mean when we say. [01:12:23] How to transfer. So, these are the 3 slides, guys, what to transfer. [01:12:27] shapes, patterns, word meanings. When to transfer, use this when you have limited data, shortage of data, when you have… when you're… when you're… when you… when you are existing model, traditional model, may not be good enough. [01:12:39] You can use the pre-trained model, how to transfer by unfreezing the last layer, or the last two layers, depending upon the complexity of the problem. [01:12:48] Nobody can be sure. Uh, the only changing the last layer. Typically, it works, last layer or last two layers should work for you. [01:12:54] But there are certain strategies and best practices that I wish to cover here, okay? [01:12:59] Now, what are the strategies? So, this is a busy slide, but if you take time to understand this, you may be able to understand. [01:13:07] Alright, there are so many things which you are, uh, which are there here. [01:13:12] I'm just… this picture… I'm just trying to explain in this slide, right? I've given the explanation. [01:13:19] In this slide, right? have a look at this. One is your straightforward, basic transform learning, guys. [01:13:26] You're… it's a very unsophisticated. Vinili approach. [01:13:31] When do you use this, basically, when both. Correct? Have a look at this. [01:13:37] let's say you have the source data set and the. [01:13:42] target dataset, correct? You have the source and the destination. [01:13:45] Source means, basically, on what was it originally trained. [01:13:49] And the new task is basically your destination or the target dataset, correct? [01:13:53] So, when you observe. that some labeled datasets in both your original task as well as your new, uh. [01:14:00] task basically match. That's when you can basically transfer knowledge. For example, animals, ancestings. [01:14:07] Animals, you know, basically, it's already there in your image net, right? So for any of the animal classification, you can be. [01:14:14] very, very confident in using all those algorithms which have used. [01:14:19] ImageNet as the input data. Why? Because ImageNet dataset consists of animals, birds, and all those things which you have seen. [01:14:27] So when the source and destination, both of them have some labeled examples. [01:14:32] Then you can go ahead and use your simple transfer lobby. [01:14:35] Second one is basically what is called as inductive transfer learning. So, this is a refinement, right? [01:14:41] So there is what is called a transfer learning, then there is what is called as inductive transfer learning. [01:14:45] Then there's what is called a transductive transfer learning. [01:14:49] Then there is what is called as unsupervised transfer learning. [01:14:53] And then there's a problem of covariant shift. I'll just explain what is inductive transfer learning. [01:14:57] See, this inductive transfer learning is used. Typically, when you have label data in your source domain. [01:15:05] Correct, you have the labeled data in the source domain. [01:15:08] And you want to apply it to a new target. [01:15:12] I repeat, your source dataset had labels. But in your target dataset, basically, you want to apply it. [01:15:20] That's when, basically, you call it us. inductive data set. Now, there are two cases here within inductive transfer learning. One is basically. [01:15:28] That in the target domain, there may be cases wherein you don't have any label data at all. [01:15:34] I have data, but it is not labeled. So this is called as self-taught learning, which is a part of inductive transfer learning. [01:15:42] Just keep this in mind. these ideas, basically. Then, in case 2, basically, you have a case wherein, in your target also, you have label data. [01:15:52] In which case, this inductive transfer learning leads to what is called as multitask learning. [01:15:58] Okay, then the third part here is what is called as. [01:16:03] Transductive transforming. I repeat, this is… Transductive, they all sound the same, inductive. [01:16:09] Transductive. Inductive has two cases when the target. has labeled data, which is called… which leads to self-taught learning when it has no label data, it leads to. [01:16:20] Multitask learning. Then transductive learning is a case. When you're working in different domains. Different domains means. [01:16:26] you have a model of, as I mentioned earlier, basically, which has been trained on dog breeds, identification of. [01:16:33] dog breeds. Suddenly, you're using this on medical images. Now, these are 2 separate domains altogether. [01:16:39] then can we use transfer learning? Try it, because nobody, unless you try experiment, basically, there are no easy answers. [01:16:47] It might work, it might not work also, nobody can give you a guarantee. But this approach wherein you're using the learning from off. [01:16:54] two different domains altogether. But the same type of task. [01:16:59] By and large, the task may be classification there, here also it is, uh, this thing, uh, task, uh, classification task. [01:17:07] Then it is called as transductive transfer learning. Then you have the final type of transfer learning, which is called as. [01:17:13] unsupervised transfer learning. Now, this is a case. When you have no labeled examples in both the domain, my source also did not have labels, my. [01:17:24] Target also does not have… label, then it's a bit difficult. [01:17:29] And when there are no labels, basically, it is called as. [01:17:32] unsupervised, unsupervised, uh, transfer learning. So this, just keep these ideas and ideas in mind, guys. [01:17:40] I've tried to summarize the same thing, whatever I've. [01:17:42] uh, told here, I've just put this in the form of a table so that you can keep this in mind. [01:17:48] And, uh, maybe in an interview, if you want to quickly refer this in future. [01:17:52] You can just quickly refer to this. Deepak, you had a question? [01:17:56] Yeah, what is self-learning and self-taught learning and multitask learning? [01:18:02] Uh, so first question is basically, what is the meaning of self-taught learning? [01:18:06] Uh, yeah. Uh, see, uh, there is a case physical… there may be cases, uh. [01:18:11] when you're building these transfer learning, when you're applying this transfer learning model. [01:18:17] That, let us say, image net data. There, the labels are there, because somebody has taken the. [01:18:22] trouble of labeling that, okay. This is a bird. The bird image is also there, and there's one more column, basically, which says that this bird is basically a. [01:18:33] pigeon, or the second bird is a crow, and the third bird is a. [01:18:35] it could be, uh, it could be a peacock or whatever it is, right? [01:18:41] So you have the image as well as basically a label to it. [01:18:45] Right now, correct? This is my source data set. [01:18:48] My… today, my boss has given me a set of images, basically. [01:18:52] of, let's say, birds itself. But there is no label to it, I just have images. [01:18:58] So, this is a case, basically, wherein I've got no label data in the target domain. [01:19:03] So this is called a self-taught learning. Wherein, it's a bit difficult for me. [01:19:08] to… or the computer, basically, since it does not have labels in the target set, basically, target data set. [01:19:14] Uh, how do… how does it basically, you know, classify? That all becomes a big, big headache. So, self-taught learning itself is a separate branch. [01:19:25] But is the problem clear? [01:19:28] Yeah. [01:19:30] You know, you're multitask learning is another case, basically, wherein I have… I may have some labeled data in target. [01:19:38] Correct? Please understand this, I may have some label data in target, which means my boss also has given me. [01:19:47] Some, uh, you know, some, uh, let's say 100 images, and yes, put the names of, uh, different birds and such things, but we are not very sure whether the labels basically correspond to the correct. [01:19:56] images or not, because many times. When annotating human beings themselves are not able to recognize properly, or the machine may have made a mistake. [01:20:05] So you want to validate whether the labels that are present in the target data is correct or not. Therefore, basically, you're trying to rebuild. [01:20:11] Now, this is a bit of a, uh, this is a bit difficult. [01:20:15] But at least it is better than self-taught learning, because at least I've got some labels. [01:20:19] Having some label against the image is always a better thing. [01:20:24] As compared to no labels against the target. Uh, dataset. [01:20:30] Yeah, one question. In this case, when we have label return source and target, so does that mean the source. [01:20:35] Act as a training and ah. Target question. [01:20:37] Absolutely right. You're absolutely right. You're training the model on the source. [01:20:42] And you're just applying it on the target dataset. [01:20:46] Okay, and if there is any conflict in the label itself, and these are not aligned, then. [01:20:54] then the performance of the model is not right, in which means that basically you have to change the pre-trained model. [01:20:55] Wood. [01:21:03] No problem. Okay, this, by and large, I think I've covered representations. Some… Uh, importance, guys, as I mentioned, I think I've already spoken about these things. [01:21:15] Use this when you have limited data, when you're seeking enhanced performance. [01:21:20] When you're looking for time and cost efficiency, uh, right, transfer learning can be used. [01:21:25] Method, pre-trained model. base model, transfer layers. [01:21:30] fine-tuning, you'll understand this, uh… Okay, just look at this case. Rosen versus trainable layer. So this is the language that we use when we use transfer learning. This is important. [01:21:40] please look at this. Frozen layers means water. Every single layer means what? [01:21:46] these layers from a pre-trained model remain unchanged during fine-tuning. I'm not touching this. [01:21:51] Typically, what are these layers? The low-level features. the early hidden layers and the mid-level hidden layers. I'm not going to disturb. [01:21:59] I'm going to keep it as it is. Why? [01:22:01] Why are you remaining… why are you keeping it as unchanged? Because they retain the general features. [01:22:07] By and large, our hotel. Or a restaurant may be rectangular, I'm just giving an example. A matchbox may also be rectangle. [01:22:14] So, our model may be good at recognizing the shapes and size and such things. [01:22:20] There is a general features, correct? the object it may struggle to recognize. That's a different task. [01:22:25] the object may struggle. So that's the reason why we, when you look at the motivation also. [01:22:32] See. when these people have trained these models, right, pre-trained models, they are also not stupid people, right? They're also not unintelligent people. They're also… they might have thought through this. [01:22:44] Because ImageNet and such things, they've collected an exhaustive list of data. [01:22:49] thousand categories, just imagine this. Correct. These, uh, objects have been fed into the model so that it can learn general features. [01:23:00] There is sufficient material, there is sufficient content in the ImageNet dataset. [01:23:05] So that wide variety of things from your shapes to size to texture, all of these things basically can be. [01:23:15] Uh, learned. All that you need to do is, basically, unfreeze the last two layers or three layers. [01:23:21] So that specific features can be learned. So general features basically do not touch, do not disturb. [01:23:26] Because they are… because they are universal patterns. Look at this. [01:23:30] We are extracting universal patterns. Circles, there may be so many objects which are basically circular in shape. [01:23:37] But if you train it on 2 or 3 objects also, it's fine. If you have trained a balloon. [01:23:43] Uh, or maybe a circle, or any other object, basically, which is circular in shape. [01:23:47] There may be several objects tomorrow, basically, at the testing stage, which are circular. [01:23:52] That does not matter, but. The general features will not change as much. [01:23:58] Look at the second part, basically, trainable features. These layers are adjusted during the fine-tuning. [01:24:05] to learn task-specific features, task-specific features means whatever task, basically, your client or boss has given. [01:24:12] That is what you're basically fine-tuning by releasing. the last few layers, so this is what we call as trainable layers, the layers which you can go ahead and train. [01:24:23] Uh, right, so that is the difference between your frozen layer and enabled layer. So. [01:24:28] I'm just giving you a diagrammatic representation. Typically, what happens, you have the input layer. [01:24:32] Wherein you're supplying the input data. This is the input data, and you have a series of hidden layers wherein some mathematical computation is done. [01:24:41] And after doing some mathematical computation, basically, you are classifying the object into class 1, 2, or 3. [01:24:48] that is benign tumor, malignant tumor, or basically severe case of malignant tumor, whatever be the case. [01:24:54] So what we are seeing is, basically. priest layers, correct? [01:24:58] Here, in the diagram, he's showing two layers as. [01:25:02] frozen. And the last 3 layers are, uh, trainable. [01:25:05] Typically, in a real-time scenario. only the last or last two or three… last few, basically. [01:25:13] are for training, majority, 70% to 80%, basically, we keep it fixed. [01:25:17] We keep it frozen. That is what we do. So this is the essence of your transfer learning. [01:25:24] Okay, now somebody asked me a question, uh, in the beginning. Sir, how do I decide. [01:25:29] which layers to freeze or drain in the initial 10 or 15 minutes, basically, somebody asked this question. [01:25:34] Sir, how do I decide which layer should I freeze or train? [01:25:38] Now, there are certain best practices here, guys. Look at this. To answer this question, basically, you need to, uh, come up with… you need to decide. [01:25:48] what kind of a data you have. If you have a very small dataset, but a similar data set. [01:25:53] Similar data set to what? Similar dataset to your. [01:25:58] ImageNet. Imagenet is one of the databases, but it is not the only database. I'm using the word ImageNet because that is the one which. [01:26:03] 80% of your pre-trained models, especially as far as vision is concerned. [01:26:08] is based on your image network. So, if you have a very small. [01:26:13] But a similar data set. Your boss also has asked you to classify animals. [01:26:18] The original dataset also has animals. Your boss has given you something related to tumor and such things, the original data set also has something related to lungs, heart, so on and so forth, basically, huh? [01:26:30] There's some degree of similarity and small. Now, this is the worst case. You can see this is the first case. [01:26:36] Now, for the first case, basically, what do you do? For smaller data sets that resemble the original dataset. [01:26:42] If it resembles the original data set. You freeze most of the layers, that is, 90% of the layers, basically, you can go ahead and freeze. [01:26:51] And only fine-tune the last one. Or 2 layers, max to max last 1 or 2 layers also if you fine-tune. [01:27:02] you are good to go, you should be able to get good results. This is the first case. [01:27:05] The second case is what? Sir, I don't have a small data set, sir, I have an extremely large dataset. [01:27:12] I've got a large dataset. However, it is similar to my image dataset, which is the mother of all pre-training models, right, which is the. [01:27:21] source of this. So, large and similar data set, this is second, second case. [01:27:27] Now, let's read this. With large similar data set, what should you do? [01:27:29] you can unfreeze more layers, which means. Instead of confining yourself to just unfreezing two layers as you did in the earlier case. [01:27:38] You'll be unfreezing 3, 4, or 5 layers, because you have a very, very large data set as compared to. [01:27:45] the original source data set. Why is… why should we do this? This will allow the model to adapt. [01:27:53] This will allow the model to adapt. While retaining. [01:27:57] The learned features from the. piece model, right? So fine-tune more. [01:28:02] And small learning rate. Choose a small learning rate, and here, the moment it is large. Large means what? There could be variety, there could be variations. To account for that, we are saying, boss. [01:28:14] you unfreeze majority of the layers. The third case is what? The third case is you have a small data set. [01:28:19] But a totally different data set. Right? You don't have a similar data set, you have a totally different data set. [01:28:25] You are talking about dog breeds here, you're classifying grapes, apples, watermelon, banana. [01:28:32] Totally, what is the connection between cats, dogs, and these things, basically? Totally different if it is there. [01:28:39] Then what should we do? But if it is a small data set on which you're expected to apply this. [01:28:42] What is the guideline here? for smaller and dissimilar data set. [01:28:48] fine-tuning the layers. closer to the input layer. [01:28:52] Look at this, this is how beautiful it is written. [01:28:54] You should fine-tune the layers which is closer to the input layer. [01:28:59] Help… helps the model. learn task-specific features from the scratch. [01:29:06] So the training has to be done from the scratch. [01:29:10] Correct? So, which means what? freeze most of the network. [01:29:15] fine-tune only the last layers. So what we are trying to say with this is, basically. [01:29:19] You have to see. These are, here, the third case is a case wherein task-specific features. [01:29:28] you are unfreezing most of the layers, correct? And therefore, the early layers is what you need to unfreeze. That's what we are trying to say in the third case. [01:29:37] The last case is a very, very complex case. [01:29:41] Wherein you have a large data set plus. You have a completely different data set. There is no. [01:29:46] Uh, there is no comparison at all between the mother dataset and the dataset that you have brought. [01:29:51] Plus, you've got a large data set. what do you do in this case? Now, what we are trying to say in this case is that. [01:29:58] You need to fine-tune the entire model. There is no person… there is no problem, there is no question of, you know, 50% trainer, 60% untrained, that I cannot say. [01:30:08] Entire model, basically, you need to fine-tune. Why this helps the model adapt to a completely new. [01:30:14] task while using broad knowledge from the. pre-trained model. So, the verdict here is fine-tune the entire model. So, you need to first ask. [01:30:25] Basically, do I have a small data set or a. [01:30:27] a large data set. Is my data set similar to the original dataset, or dissimilar? [01:30:32] Based on this, you can follow one of these strategies. [01:30:36] Are you clear with this case? Are you able to understand this? [01:30:45] I think you have a question. [01:30:48] Yeah, so if it's a large, different data set, and we are fine-tuning, like, almost all the layers. [01:30:53] Yes. [01:30:54] We are not. So, we will… won't it be better to create a new model rather than. [01:31:00] Using the pre-trained model. Unless it's very costly or. [01:31:02] Uh, see… Yeah, see, see what happens with transfer learning is basically, uh. [01:31:06] Complex. [01:31:12] Transfer learning definitely has a lot of advantages as compared to building the model from the scratch. [01:31:18] If you have sufficient time, efforts, money. and bandwidth, you can maybe build a model from the scratch. [01:31:25] typically 80% to 90% of the times your transfer learning outperforms any model which builds from the scratch. Any model which is built from the scratch. [01:31:35] Typically, as a general thumb rule. [01:31:42] Okay, got it. [01:31:44] Typically, right? But as a learning, basically, you can just take this in your project, right? Transfer learning, basically. [01:31:51] take two totally different data set. And still try to build one model from the scratch, and the other model from the beginning. [01:31:56] So here again, when we are seeing transfer learning, go back to the first few slides wherein I said. [01:32:02] Use transfer learning when you have limited data. limited data, right? As you are saying, basically, sir, in your case, basically, there are two cases, sub-cases. [01:32:14] One is, basically, you have a large data set. In case you have a large dataset, you can build the model from the scratch. [01:32:21] But the new data set which you are trying to apply it on, if that is a very, very tiny dataset. [01:32:27] There is no question of me being able to build a model from the scratch. [01:32:30] So that, again, basically comes into picture, like, how much data set do you have? [01:32:35] in your current kitty, because based on that, I will be able to suggest. [01:32:39] Whether that transfer learning should be used or not. [01:32:43] General thumb rule is, use, uh, transfer learning. When you have limited data set. [01:32:50] If you have unlimited data set, as you are suggesting, basically, we can go ahead and start building the model from the scratch. [01:32:58] So, when we say large, different data set, like, how is it different from our limited different, like. [01:33:04] How is it different from the third method? If we are… yeah. [01:33:07] The third method is, let's say. Your boss has given you, let's say, 50 images. [01:33:14] He has given you 50 images, correct, of, uh, you know, people writing in, of students writing an examination. Let's say it's a proctored examination. [01:33:22] And you have, uh, grabbed some images and such things, basically. [01:33:26] And based on these images, you have only 50 images. [01:33:29] Now, let's say 50 images, basically, do you think you can build in a new model from the scratch? No, you can't build a good model from the scratch. [01:33:38] Therefore, I'm seeing one is it is small, because 50 is a very, very small sample, and it's a completely different data set, because when you looked at the image net dataset. [01:33:47] There are 7 categories, there could be more categories as well. [01:33:50] But nowhere had we taken, you know, the input data I had about proctored images and such things. So it's a completely different dataset. [01:33:59] It qualifies as both small as well as different dataset. [01:34:04] Does that answer your question? [01:34:10] different as compared to the mother dataset, which is the ImageNet dataset. [01:34:11] Yeah, it does. [01:34:15] Because nowhere there, basically, they have taken, uh, you know, proctored images, or let's say, underwater scuba diving. Let's say there's a task, basically, you see all these. [01:34:24] rich aquatic fishes and such things, correct? That may not be there in the original dataset at all. [01:34:31] So it's very, very different as compared to the task that I have in my hand that is very different from the original data set. [01:34:37] It is small because I may have barely have. [01:34:40] for 40 majors, 50 majors, that to it is not annotated properly, what do I do? [01:34:45] So that qualifies as the third case here. [01:34:49] So, in this case, uh, we are saying we'll unfreeze the layers closer to the input layer and fine-tune them. [01:34:55] Yes. [01:34:56] But if the same case, let's say, this underwater scuba diving cases, I have a larger. [01:35:00] Yeah. Yes. [01:35:01] Uh, said, for example, like, 10,000. Then also, we are fine-tuning, right? Then why we are fine-tuning the entire layers and, like. [01:35:10] What's the difference between choosing these two? [01:35:11] You have to fine-tune the… See, you're fine-tuning the entire model in the sense, uh, you know, you can… when I say entire model, basically. [01:35:21] See, it is not that 100% of the layers, 90 to 95% of the model is what you're fine tuning. [01:35:30] First, you know, all of these models, you have to start with, you know, 10% of the layers, I'll fine-tune, look at the results. [01:35:36] If you're getting 60% accuracy, fine. Then, from 10%, you unfreeze. [01:35:42] 20%. 20% to unfreeze. Look at the accuracy. [01:35:47] If the accuracy increases beyond 60%. Huh, that is the first clue to you that unfreezing is the option. [01:35:54] Otherwise, basically, after unfreezing, also, basically, you're getting 60%, not much of advantage. [01:36:00] It means, basically, unfreezing is not the answer for your question. [01:36:04] then you have to adopt a completely different strategy. [01:36:08] Okay, got it. So, basically, smaller set will have a tendency of lesser variety, so I can. [01:36:16] Yes. Yes. [01:36:17] Do fine with one or unfreezing 1 or 2 layers close to the input layer, and… If I have 10,000 data sets, it won't be sufficient. We might have to. [01:36:21] Yes, more inconsistent… more inconsistency, more variety in the fourth case. [01:36:23] country. [01:36:27] Here, small case, but more consistency. [01:36:35] Okay, any other questions? [01:36:41] From application space. Yeah. [01:36:43] Yeah, just one, uh… If you can… so basically, I just want to understand, uh, freezing layer and, uh, fine-tuning layer. Freezing means the weightage would not change, the weights would not change, right? [01:36:56] Uh, freezing, you're right, yeah, the weight sensor things will not change. [01:36:57] Okay. If you quote an example from, like, because you're talking about MSNet, what is freezing, and what is. [01:37:06] attainable, trainable. Learn. [01:37:09] Uh, see, ImageNet is the dataset. Based on that dataset, there are many algorithms. Let's say VGG16 is an algorithm that has been trained on, let's say. [01:37:18] ImageNet. If there are 16 layers, basically. I think I may have that slide as well. Just give me one second. I may have a slide on that. [01:37:27] So these are some of the examples, uh… [01:37:40] Not mentioned… [01:37:46] Okay, let's take a look at this. Maybe this may help us. [01:37:49] Oh… So VTG16, there are 16 hidden layers, correct? [01:37:56] So, when you look at the weight layers, there are 16 weight layers, that is 13 plus 3, basically. [01:38:03] So what you can do is basically last 3 or 4 layers is basically, is what you can unfreeze. [01:38:09] And the remaining 13, you can just, in the first iteration. [01:38:13] Keep the first 13 weights, whatever you have learned, basically, as it is, and only the last 3 or 4 hidden layers is basically what you can. [01:38:21] are unfreeze. [01:38:26] Okay, and how do we get information about what. [01:38:29] we have in those layers. [01:38:30] That's a bit difficult, because this is a bulky model, yeah. See, when you look at many of these things. [01:38:35] Uh, let me just show you one example. Sure. [01:38:46] Let me show you one example. Parameters, I'm just looking for the word parameter, okay. [01:38:53] So, just take a look at this. Let's say if you talk about AlexNet. [01:38:57] In this model, there are 62 million parameters. Which means there are 62 million weights. [01:39:03] Now, very, very difficult to actually get the weights and such things at that stage. [01:39:08] Very difficult. And therefore, most of these models are… we criticize them, saying that they're black box because. [01:39:14] Internally, it has learned the weights, but externally, if you're asking, like, you know, what is the weight value and such things for one particular layer, very, very difficult to obtain it. [01:39:26] Okay, but how do… how do we, uh, take a decision on. [01:39:27] Such… [01:39:31] It's an experimental process. That's why I said it's an experimental process. [01:39:32] What are the… Okay. [01:39:34] Start with small, then slowly start off, sort of increase it. [01:39:40] First, unfreeze one or two hidden layers. Look at the accuracy. If you're getting a rich accuracy of 75% plus, basically, your job is done. [01:39:48] Okay. [01:39:49] After, uh, let's say, after unfreezing two hidden, uh, after unfreezing basically two layers. [01:39:55] you're still stuck with 70%, basically, but. In the next iteration, in the next experiment, you decide, okay, 2 has not worked, I'll increase it to 4. [01:40:05] After unfreezing 4, basically, if your accuracy jumps up. [01:40:09] to, let's say, 80%, then basically you have answered your own question by unfreezing your model is able to. [01:40:15] are able to learn a lot of specific features, and therefore your accuracy has gone up. That is the answer to your question. [01:40:22] But after unfreezing also, basically, my accuracy is not improving basically, then. [01:40:27] It means that the model is not the, uh, problem. It is not able to learn even if you unfreeze more and more, so don't waste your time unfreezing more hidden layers, because it is not working for you. [01:40:39] Got it. [01:40:40] Continue, this is an experimental, all of these deep learning models and such things, there is no silver bullet. [01:40:45] Start with, uh, start by unfreezing one or two. [01:40:48] didn't make a move on, if that is… it looks promising. It looks promising. [01:40:52] Then unfreeze more layers. If that improves the result, you basically start unfreezing more in the. [01:40:59] third or fourth iteration. By 3 or 4 iterations, physically, you will have a clear answer. [01:41:03] is unfreezing appropriate? is unfreezing, basically giving you results or not, you'll be able to understand. [01:41:11] Just one question. So… In terms of the numbers, how many layers do we need to unfreeze? We have answer for it, it's experimental, but what are those layers that do we need to unfreeze? [01:41:23] Is it also, like, based on the accuracy that we get? [01:41:27] Uh, see, what are those layers, basically, when I, uh, when you say, say, in the case of this VGG 16th. [01:41:34] The 18th, the 6th, uh, VGG 16th. The 13th, 14th, and 15th. [01:41:40] Oh, sorry, 14th, 15th, and 16th, uh, layer is what you need to unraise. [01:41:44] Typically, as a starting point. So, if you look at Inception V3, basically, first, uh, you know, you can look at any of the models for Google. [01:41:53] First, try to find out how many layers are there, hidden layers, and you may come to the conclusion that there are 50 hidden layers, or 60 hidden layers. [01:42:01] Based on the number of hidden layers that are present, you unfreeze the last. [01:42:06] layers. Let's say ResNet 50. There are 50 Eden layers here. He has given it here itself. [01:42:11] So maybe 49th and 50th, you basically can unfreeze to begin with. [01:42:19] Okay, if you could quote an example, suppose, uh. [01:42:22] Yes. [01:42:23] Yeah, suppose Edge and, uh… You know, probably as comes into layer X, right? So how do I get to know that? [01:42:30] Mm-hmm. See, I'll just show you one example here, right? Just take a look at this. Can you see this, uh, Google collab? [01:42:40] So this is one, uh… this is one, uh, model which I have built. [01:42:45] So that you could understand this. This is a popular dataset called as MNIST dataset. Mnist dataset is handwritten. [01:42:51] images, basically, right? So people have written images. For example, you may write 3 in a particular way, I may write 3 in other ways, somebody else may write 3 or 4 or 5. [01:43:01] So, like, this… there are from 0 to 9 people have given handwritten images. [01:43:06] And I am trained to build a model on this. [01:43:10] dataset. So you can just see here, this will… this may give you some clarity, everybody. Just take a look at this. [01:43:15] Uh, some basic, you know, TensorFlow, right? Mnist data preprocessing I've done for transfer learning with CNN. [01:43:22] Uh, you need TensorFlow. Tensorflow… Tensor is a multi-dimensional array, okay? So for images and such things, we look at an array. [01:43:30] So you have TensorFlow, and then basically NumPy. Some of the basic packages I have, uh, I have sort of imported. [01:43:37] And this is an in-built dataset, so if you run this command, mist.load underscore data. [01:43:44] You will be able to get the training images as well as the training labels. [01:43:47] It's the annotation, correct? Similarly, you'll get the test image and the test labels. [01:43:52] So this is, as far as the loading is concerned. [01:43:55] And then, in the third step, you can look at this. [01:43:58] Convert a grayscale image, it's like a black and white image, to a RGB image. Rgb means red, green, blue. [01:44:05] So, black and white image, I'm basically converting into a… into a colored image. And these are some pre-processing steps that we need to do, okay? [01:44:15] So, how do you do this, basically? Multiply by 3. Why? Because RGB, there are 3 channels. [01:44:21] This you'll understand later, because you have not learned image processing, so don't worry too much if you don't understand the details as of now. [01:44:27] But these are the general steps, basically. I'm converting a grayscale image into a colored image. [01:44:32] And then I'm resizing the model, uh, for models like ResNet, residual network. [01:44:38] Correct. And then I'm convert one hot encoding means if you have, uh, you know. [01:44:44] text and such things, we can convert this into numbers. [01:44:47] Correct. So, I'm doing some basic level of pre-processing. [01:44:50] I'll just show you… this will download the image. [01:44:54] Now, there is one such model, which is called as mobile net V2. [01:44:58] Look at this, this is a transfer learning model. Mobile net. [01:45:03] MobileNet V2. This is the name of the model, and you can look at some of the properties of this model. See, the weights have already been learned from your. [01:45:13] Uh, ImageNet. So, this is a simple parameter which is called as base model. [01:45:18] Now, what do you do here? I've just put a comment. I hope you can see this. [01:45:22] base model is .trainable is equal to false means you are not training this. [01:45:27] You're not retraining this, you have frozen this as it is. [01:45:31] If you give this as true. Even the base model will be trained. [01:45:36] Even the base model will be trained. Then, basically, it's a case of simply, uh, you know, putting the. [01:45:43] See, here, in this base model, if you give this as false, it will not be trained. [01:45:49] If you give this as true, the foundation model itself can be retrained. [01:45:53] The foundation model itself can be retrained. I'll give you one more example, then I've gone on to compile this model. Okay, see here? Here, basically, model. [01:46:02] I have not, uh, you know. unfreezed anything here in this model. [01:46:07] I'll give you one more example, basically. See, this is the part. Can you see this? Fine-tuning the model part? Can you see this? [01:46:17] are able to see this? See, this… this should answer your question. [01:46:18] Yes. [01:46:21] Fine-tuning the model, how does it happen, base underscore model dot trainable is equal to true. [01:46:26] And I'm then running a for loop. I'm seeing for layer in the base underscore model dot layersUp. [01:46:33] 200, the first hundred layers in mobile net. layer.trainable is equal to false. [01:46:40] Which means, basically, up to 100 layers, basically. You don't need to train, which means you're frozen. [01:46:48] Whatever risk is there, rest of the layers are there in this mobile net, you go ahead and train. [01:46:53] So if you can just run this simple for loop. [01:46:57] On top of the foundation model, uh, you are basically. [01:47:00] you're basically, uh, you know. doing our transfer learning. Now, look at this accuracy level. [01:47:06] What is the accuracy level after almost 5 iterations. [01:47:09] The accuracy that I'm getting is around 74%, which is a decent level of accuracy. [01:47:14] If this, on the validation dataset, I'm getting 84, which is also very good. [01:47:18] Or else, basically, if this approach did not work, if instead of 100. [01:47:22] Basically, what am I saying? For layer in base underscore model dot layers, up to 100, you don't train. [01:47:29] Which means what? Reduce it to 90. Which means 90 will be frozen, the remaining layers will be learned. [01:47:36] Look at the accuracy down. If it is improving well and good, your strategy of. [01:47:40] training, uh, freezing, sorry, is working, correct? If 90 does not work, experiment with 80, 70, 60, 50. [01:47:49] Then, basically, this is how you can fine-tune and basically obtain a higher level of accuracy. [01:47:54] Is this part clear? [01:47:56] Yeah, makes sense. [01:47:58] I'll give you one more example, uh, in the context of… this is the, uh, okay, this is the old model itself. [01:48:06] So, when I fine-tune the model, what is the accuracy? That's what I'm showing. [01:48:10] Um… see, this is the true case, just see here. [01:48:18] I hope you can see these images. See, this is the original image where somebody has written it as. [01:48:23] 2. The model has actually predicted this as 2 after fine-tuning, so prediction is equal to true. [01:48:29] Which is the correct classification. This is 3. Prediction is also equal to, uh, predicted as 5. [01:48:35] Sorry, true is 3, predicted as 5, so this must be a misclassification then. [01:48:40] This is 5, but this is predicted as 5. [01:48:43] Actually, it is 5, but the model is predicting S5, which is the correct classification, but this is a misclassification, the middle one. [01:48:50] The model has mispredicted this as 5. Okay, so you can have misprediction as well. [01:48:55] Actually, it is 4, predicted as 4. through 7, predicted a 7. So when this is matching, it is the correct classification. [01:49:03] Peru is 9 predicted 9. So it is just giving you some examples as to what is the correct classification. So here you can see true 6 predicted 6, true 6 predicted 6. [01:49:12] 2 is 4. This is a great achievement, but in fact, it looks like 7. To naked eyes, it looks like 7. [01:49:18] But the model has done a good job of predicting this S4. [01:49:21] So, when you take a sample here and compare, and if you see that there are a lot of mismatches and things. [01:49:26] This means that your strategy of unfreezing has not worked. So, I'll just give you one more example on similar lines. [01:49:33] So this is a model which is called as VGG16. [01:49:36] This model is called as VGG16. I've done, by and large, the same level of preprocessing, normalizing, and such things. [01:49:43] First step is, basically, you have to load this VGG 16. [01:49:47] Correct? So, since it's an inbuilt model, if you can run this simple command, VGG60, you can store this as a base model. [01:49:55] And then, basically, you can freeze the base layer. How? By giving these parameter as false. Just give this attribute as false. [01:50:01] Now, what you can do is, uh… Firstly, you're building this model, okay? [01:50:09] I've compiled the model, trained the model. Now you look at the fine-tuning that I've done, which is optional. If your base model itself is giving you good results. [01:50:18] I think, Pallavi, I think you asked me this question, therefore. [01:50:20] Just have a look at this. If your base model. [01:50:25] This fine-tuning is an optional thing, right? It's not necessary that you always do this. [01:50:30] If your base model is working. don't have to fine-tune. Here, I'm just showing this to you. Have a look at this. [01:50:37] Fine-tuning is an optional step. unfreeze some of the top layers of VGG16. [01:50:45] For the layer in base model.layers. up to minus 4, which means. [01:50:51] from the right side, last four layers, basically. I have said, basically, trainable is equal to false, which means what? Last. [01:51:00] four layers physically, I'm fixing. Here, for the layer in the base model. [01:51:05] from 4 onwards, everything else, basically. you are basically training. So this is how you can basically, by running this simple for loop. [01:51:14] In the fine-tuning portion, you can, uh, you can experiment. [01:51:19] This works. You can try this as an optional. I'm writing this as optional. [01:51:24] Because if your base model at this stage, when you have downloaded this base model. [01:51:31] If that base model itself is working well, and it is giving you satisfactory results. [01:51:35] You don't need to fine-tune anything. If the base model is not satisfactory and we want to fine-tune, basically. [01:51:43] This is a strategy that you can use wherein you can unfreeze some of the top layers. Very simple command, within the square bracket, you can experiment. [01:51:50] Next time, basically, if minus 4 does not work, give it as minus 5, minus 6, minus 7. [01:51:55] And this will also change accordingly. Which means some portion of the model you are. [01:52:02] keeping fixed. Other portion of the model, you are basically fine-tuning. [01:52:07] experiment with this. I'm not at all saying that only freezing and unfreezing basically will. [01:52:11] give you, uh, results. There are other cards also you have at your disposal which you can play, which means. [01:52:18] The loss is categorical cross-entropy. There is no hard and fast rule that you should always use categorical cross-entropy. There are other parameters also that you can go ahead and experiment with this. [01:52:30] experiment, you can specify, uh, optimization, like ADAM optimization, so on and so forth. Rmse, root mean square error. [01:52:38] By specifying different parameters, basically. you can hope to get better results. [01:52:44] Uh, for your model, right? But the transfer learning that you have learned is this much part. [01:52:52] Correct? Rest of the things are basically another topic. [01:52:54] Uh, for another day. Did you understand so much, guys? Everybody? [01:53:07] Swagat Kumar Patnek? [01:53:10] Oh, hi Miten. I have a quick question. The validation that you just, you know, showed. [01:53:15] So, for every layer that we are fine-tuning, are we, you know, doing the validation, um, manually, or no, is there any way we can do it programmatically or something? [01:53:26] No, you can do it programmatically as well, right? Maybe you can just say first level of experimentation. [01:53:32] What is accuracy? Second level of experimentation, what is the accuracy? But I have not done this automatically. I prefer to do it manually, because. [01:53:42] These models are really bulky. Which means that if you give too much of command, if you try to do too much of experimentation, it'll go into an infinite loop, and you may not get the results. [01:53:54] You'll have more control if you do it like this. [01:53:55] So, if we have, um… I mean… [01:53:58] But for large number of layers, is it, you know, feasible to do it manually? [01:53:59] First run, first. [01:54:05] See, layer, sir, anyway, large. But your problem here is what you are basically checking with, uh, checking by experimenting. [01:54:12] different by checking by experimenting. different level of layers, yeah, correct? First four, first six first, then eight, correct? [01:54:22] Mm-hmm. Okay. [01:54:23] First, unfreeze, then look at the accuracy. You copy-paste the same code, uh, change it to 6. [01:54:28] rerun it. It's as simple as that. like this 4 or 5 iterations you do. [01:54:31] Okay. Yeah, so the seeding has to, you know, start from somewhere based on, you know, the initial analysis. Okay, got it. Thank you. [01:54:37] Somewhere, yes, yes. Start with… start by unfreezing 1 or 2. [01:54:41] That will give you a good heads-up. [01:54:46] Got it, got it. Thank you. [01:54:47] Yes. Okay, I'll just, uh, do… before I close, guys, I'll just show you a tool which you may, uh… Lake, very much. [01:55:03] See, in Python and all, you have to, uh, write some quotes and such things, which is okay if you have the patience and such things, you can go ahead and write. [01:55:12] Now, what happens is, uh… Where is the story? [01:55:37] Suddenly, 4 or 5 windows will open up. [01:55:51] This is a beautiful tool, Grace, orange. It is freely available, you can just download it from the Annet Orange tool. [01:55:58] it'll help you do a lot of things, guys. [01:56:00] And I'll just show you one small, uh, example. [01:56:04] So it's a very interesting example, right? I've just, uh… created a folder which is called as Pets Guys. [01:56:14] This is called a spits folder, okay? So here, uh, you have cat images, correct? [01:56:19] You can see here, just for the sake of learning, right, I've just, uh, dumped some, uh. [01:56:25] CAT images here, you can see here. All these are cat images which I've downloaded from Google. [01:56:30] Correct, I've created a folder. around 15 images, I think, are there, okay. [01:56:36] Then here, you have dog images. These are all some dogs. [01:56:42] I've deliberately taken some small dogs because then the algorithm gets confused whether it's a dog or a cat. [01:56:47] Correct. These things, it may be able to classify, but this. [01:56:50] picture that you see, the algorithm will definitely get confused, because it looks like a cat, though it's a dog. [01:56:55] So, these and all are okay, not bad. I think it should be able to classify properly, right? We'll try to sort of, uh… This also, I think the algorithm will get. [01:57:03] Uh, confused. But you can see here how beautifully you can. [01:57:10] build a model here. Let me close this unwanted windows, uh… I'll close this. This is my orange tone. [01:57:19] Just right-click, correct? How do you build a model, right? [01:57:23] So, to build a model, first of all, I need to import some images. I'll just use this command, which is called as import images. [01:57:30] So let me click on this. So, this is called as a widget. [01:57:34] So it's just drag and drop, you don't need to do anything, correct? There are 30 images of 2 categories. [01:57:40] I'll just say reload, okay? So I've loaded this. [01:57:46] Then, uh, what I want to do is basically view this image, these images, image viewer. [01:57:52] One more widget. Establish a connection here. Double-click on this thing. [01:57:58] You can see those images which you saw in the folder are basically appearing here. [01:58:03] These are the images, basically. So, which means. I've been able to successfully import the images. If you have not imported here only, you can find out that there are some errors and such things. [01:58:16] Now, you can just do a data table. correct data table. [01:58:21] Establish a connection between the imported images and data table, and double-click. [01:58:25] This will give you some kind of a metadata. [01:58:29] Okay, so you can see here, the first few images are of cats. [01:58:32] Correct, how is it stored? It's all of JPEG file. [01:58:34] What is the size, width, and height of each of these images are also basically displayed, okay? [01:58:40] So you can do very cool things with this case, right? So… There's some basic information is what it is giving. [01:58:46] Now what I'm going to do is, basically, I'm going to do image embeddings. [01:58:51] Image embeddings is like converting this data into numbers. [01:58:55] Correct? So, just have a look at this. I am going to… okay, before this, I'll just show you. [01:59:01] In image embeddings, whatever you show, right, whatever I was talking about, VGG16. [01:59:06] A lot of these interesting transfer learning models are there. [01:59:10] So VGG16, it just gives a nice explanation here, 16 layer. [01:59:14] image recognition model trained on image data. like this in the drop-down menu, you can see here, Inception V3, SqueezeNet. [01:59:22] VDD16, VGG19, painters, deep lock, open face. So all of these models are there. [01:59:31] So, if you want, basically, you can just click on this question mark, right? This is like a help option. [01:59:36] This help option is very, very… There is no documentation for this widget, which is not true. [01:59:43] Oh… It should produce a documentation. [01:59:50] So, when you're doing this parallel, you can just open up a side-by-side documentation and just keep these points in mind, okay? [01:59:57] You'll be able to learn a lot of things, right? Because nobody can keep all of these things in mind, okay? [02:00:01] There are so many things, you can just keep, uh… these things in mind. You can just see here what is the squeeze-less model. It is very small and fast model. [02:00:11] Right? Very small and fast model for image recognition trained on ImageNet. See here, everything has been trained on ImageNet. [02:00:17] Google's inception V3 model trained on ImageNet. 16-layer image recognition model trained on ImageNet. [02:00:23] This is a 19-level layer. Specifically for painters. [02:00:28] Right? Paintings and artwork, if you have, you can use the painter's embedder. [02:00:32] Correct? To predict painters from artwork images. Then, if you have east cell, like bacteria, you may have east cell, right? [02:00:40] So they have a separate algorithm called as DeepLock. [02:00:42] So, like this, there are many, many, uh, different algorithms. If you want an in-depth explanation, maybe you can just go through this, uh. [02:00:50] our documentation, okay? So, what this does is, see, for me to. [02:00:57] build any machine learning model, I have to. embed this. You can see here. [02:01:01] 100%. So, by default. It is using what? It is using Google's V3, correct? [02:01:07] Sorry, VTG16, I think it has used. No problem, I think I can change this to Inception V3 as well. It will quickly, uh… run this. [02:01:18] This is… it has converted all of these images. [02:01:22] into numbers. How do you know, sir? So, Ctrl-C, Ctrl V. [02:01:27] Just see here, if I just put a data table here and double-click. [02:01:30] See, against each of these, you can see here N0, N1. This is a new. [02:01:35] Uh, column that it has created. These are the features that it has extracted. I hope you can see this. [02:01:41] So this entire cat image. This is one column of the cat. [02:01:45] This is the second column, third column, uh, fourth column, so on and so forth. If I scroll to the extreme right side. [02:01:51] You can see here, it has created 2047 features. [02:01:55] Correct? These are the 2047 features it has created. Now, one, it's a big data set. [02:02:01] rate 2047 columns is too much. Once you have extracted these features, now you're the boss, you can do what you want, segmentation you want to do, do it. [02:02:11] prediction you want to do, you can go ahead and do it. [02:02:13] Since I started this, basically, I'll just quickly finish this. I'll just put a node. [02:02:19] Here, which is called a test and score. Okay, what happened to this? [02:02:31] Okay, I got… I thought it got… So, establish a connection here. [02:02:37] And then, basically, cats versus dogs. So, it's a classification model, so I'll be using a logistic regression model, okay? [02:02:44] So this is the tool. I'll establish a connection here. [02:02:49] So it is running a logistic regression model, okay? [02:02:51] To differentiate between cats and dogs. Okay, 89% is complete, so the model has been built. [02:02:58] Now, there is what is called as a confusion matrix, right, to just check whether the model is doing well or not. [02:03:04] So you can just see here… Let me just establish a connection here. [02:03:10] You can just see here what is happening here. [02:03:13] Uh, see… The diagonal elements here represent the correct classification. [02:03:19] And the off-diagonal elements basically represent the misclassification. So what has happened here is basically, uh, these 59 images. [02:03:29] correct, have been 59 cat images. I think it is double counting many of the cats, basically, at the back end, which is, uh… Maybe there might be some problem in the data loading. [02:03:37] Out of the total 59 distinct cat images. 59 have been correctly classified, 0. [02:03:45] I have been put as dogs. Similarly, here, out of the 51 dog images, physically, 51 have been correctly classified. This is too good to be true, because a small data set I've taken. [02:03:54] It goes to show. The accuracy of the model. So instead of a, uh… Logistic regression, let me just see if there's a neural network kind of a model, right? Any model, let's. [02:04:07] Problem is, it takes a long time to train a neural network. [02:04:12] Not too bad. [02:04:28] Okay, so let's look at the performance of confusion metrics. [02:04:32] Here, one of the images it has misclassified. It's actually a cat. [02:04:35] The model has actually predicted this as a dog, correct? [02:04:39] So, with neural network, you have one misclassification. I can just click on select misclassification. [02:04:45] And then, basically, I'll put one more image viewer. [02:04:49] image viewer node here. Once they put this image viewer node and connect this here. [02:04:55] Basically, you can see here, this is the. cat image, but the model has recognized this as a. [02:05:01] Uh, dog image. Correct. So, this is one good tool, guys, which you can always use, and you can see how quickly you can build a model, you can see for yourself. [02:05:11] No writing quotes and such things, but less customization, because any… with any… Of your, you know, drag and drop technology. [02:05:20] Uh, you have less customization. [02:05:25] I hope you're able to understand this. [02:05:26] Yeah. [02:05:32] Okay, uh, any questions for me? Shall I share the quotes, everything, guys? [02:05:40] Yeah. [02:05:41] We do. I'll share it with the… with Simran. I think she can just transfer it and put it in the… Put it in the… your LMS portal. [02:05:42] Thanks. [02:05:53] Okay, were you able to understand the gist of what is transfer learning and systems? [02:05:58] How did you find it? Did you find it, uh, good, usable, interesting, boring? [02:05:59] Yes. [02:06:04] That's interesting. [02:06:05] Just keep learning, you'll not, uh, learn these things in one day, guys. [02:06:10] So keep it, uh, keep on, uh, you know, reading something. [02:06:14] Where you'll develop your understanding here and there, whenever you get a time, run a quick and a dirty model. [02:06:19] You know, basically be able to, you know, um… learn a lot of things. [02:06:24] Uh, because Rome was not built in a day, right? So you can't master one of all of these things in one day. [02:06:31] Now, when you are learning this, when you're reading this, I'll share the slides here. [02:06:34] So you can see it for yourself, guys, you can see some of the architecture, just in case you're interested. [02:06:40] You can just go through this, correct? MobileNet is the easiest. See here, how beautifully it has been given. [02:06:47] MobileNet is used. Uh, for images that you click on mobile phones, smartphones, and such things. [02:06:52] Because, by definition, the resolution will be very, very low. [02:06:58] So for all of these things, basically, you can use mobile data. [02:07:00] So you can see there's a lightweight CNN, optimized for devices with limited resources. [02:07:07] For your limited resources, then you can use smartphones, drones, AR, VR technology and all, you get low-quality resolution. [02:07:15] So each of these things, basically, guys, it has its own advantages and disadvantage. [02:07:21] And in the last visa, I've put one slide, one point I've given on applications. [02:07:24] So, then read this, then you'll be able to understand whether you're on the right track. Are you applying this model for the right purpose or not? [02:07:31] So, like this, around 8 to 10 slides have made. [02:07:34] So, uh, for each and every model, right, and what is the past performance? 7.3, which means. [02:07:40] It has given decent percentage of accuracy. If you want to use VGG16 mainly for feature extraction style transform, style transfer in the sense. [02:07:49] If you see a good, high-quality image of. uh, Tom Cruise or Ritik Roshan, or any of these, uh. [02:07:56] actors, and you want to transfer their style onto your image. [02:08:00] For that kind of activity, you can do this. [02:08:03] So each algorithm has its own, uh, application. That's what I'm trying to tell you. [02:08:11] Method 1 questions, like, uh… [02:08:13] Okay, so that's what I had. [02:08:14] We'll be going to have, uh, any other sessions on transmit learning, or this is… [02:08:19] This is all. [02:08:25] Okay. [02:08:26] Uh, this is the one, yeah. you'll have on other topics, physically, but transfer learning, this is the one. [02:08:35] Yeah. [02:08:37] Uh, this one. Do we have, like, can you share any reference from where we can sort of practice this? [02:08:45] I see… yeah, yeah, most of these things you can obtain in analytics with you. There's a blog called as Analytics with you. [02:08:46] Or… I think… [02:08:51] You can look at that, or Kaggle is a good place where you can learn a lot of things. [02:08:56] Right? Try these two. Kaggle. analytics Vidya. The third one is basically what is called towards data science. There's a blog that is called as Towards Data Science. [02:09:06] Many times they give you code. But Kaggle and analytics with, they are typically at the end of the blog or write-up, they usually give a lot of quotes. You can just experiment with that. [02:09:17] You can copy-paste the same thing, execute it later, if you want, you can experiment with some, uh, some modifications on that. [02:09:24] Last one, last blog, very good blog, is basically KD Nuggets. [02:09:29] KD nuggets. So, KD nuggets, these are the four resources that you can always use. [02:09:34] If you are mostly into video, there's a fantastic video that I would like to recommend, uh, 3 brown and one blue, something like that. You type it. [02:09:42] 3 brown, one blue, something like the name. Once you type it, you'll get very, very good deep learning videos that you can learn a lot. [02:09:55] Thank you, that helps. But… [02:09:58] Okay, you've shared some, uh… Yeah, Kaggle, this also helps you. This also is good. I think somebody had shared in the chat window. [02:10:06] Uh, okay, this is the one, yes, correct. See, I'll just show it to you right now. [02:10:14] See, go to Kaggle, and just type transfer learning. [02:10:20] If you just type transfer learning, basically, it'll take you to a lot of these, uh. [02:10:25] Correct? So you can see here, transfer learning, there are so many good points that you can pick up. [02:10:30] Correct. They'll also give you the codes, free codes also you'll get. [02:10:34] Sir, what is, uh, right, as you scroll down, basically, this, some sunflower data he has taken, and he has done. [02:10:41] Methun, you are not sharing, I think. [02:10:42] No problem, you can learn it, or… Oh, sorry, sorry, sorry, sorry, sorry, I'm sorry. [02:10:48] Can you see now? Are you able to see this? [02:10:55] So in Google, I've just typed Kaggle and transfer learning. [02:10:56] Yes. [02:10:59] Once you type this, guys, you'll get a lot of these links, comprehensive data guide to learning. [02:11:03] Correct. This entire page, just try with different options, basically. [02:11:09] One or two, basically, you'll find it very usable, uh, and, uh, you know, easy to, uh, learn. [02:11:15] Pick up that. See, transfer learning for image classification. Some of them you may find it difficult, ignore that. [02:11:24] pick up something which is easy to implement, and here. [02:11:28] They'll also give you the code size for many of these things, you can see here. [02:11:31] Keras pre-trained models, correct? So you can look at this as well, right? [02:11:36] Or, if you have any doubt, any confusion, basically always go to GitHub. In GitHub, basically, repository, you'll find. [02:11:43] You can see here, everything will come. What is the input he has taken? [02:11:48] Right. [02:11:56] These are the different models. Output. Right. By and large, sometimes he shares the quotes as well. [02:12:04] He shares the quotes as well. You can do all of these things. [02:12:09] Or go to, uh, transfer learning, and you can just type GitHub. [02:12:13] GitHub is also a good place, guys, wherein you can get. [02:12:16] a lot of things, correct? You can see so many repositories. Just click on this. [02:12:21] And sound transfer learning with Python. [02:12:26] Correct. You can just click on this code. You'll get the code. You can download all of these things. [02:12:32] open with GitHub Desktop, download the ZIP dataset, everything will come. [02:12:37] Right, this is a good one. I think he suggested a book as well here, transfer learning with Python. [02:12:44] Uh, this is a free, uh… this is a free, uh… pre-book, I guess, correct? [02:12:50] Look at the content she has developed, machine learning fundamental basics. [02:12:55] Right, yes, you have so many content, you can just click on this, and you can learn. [02:12:59] Now, if you want any books and such things, Grace, you can just type a PDF drive. [02:13:06] PDF drive, so when you click on this, you can download a lot of sample books free of cost. [02:13:12] Correct, any of these books and almost anything and everything under the sun you can easily download, please. [02:13:18] See here, you can just type any and everything means, uh, 90% of the books that you search for are available. [02:13:25] Here and there, there may be some stray books which may not be available. If you can just type this. [02:13:29] They'll give you as a PDF file, correct? You can see here, 74, uh… I think 7 crore 49 lakh, 24,000 files are there, right? [02:13:38] Uh, from… based on sci-fi to… Your machine learning, deep learning, novels, anything and everything you can find free of cost. [02:13:46] So, any book, if you want on transfer learning, just search for it. [02:13:50] PDF drive is a good, uh, resource for you to. [02:13:53] Uh, search for books and all these. [02:14:03] Okay, this is what I had. Thank you so much for your time. [02:14:04] Yes, awesome. [02:14:05] That's true. [02:14:06] Nice. [02:14:09] Uh, thanks a lot, yeah. Good night, bye-bye. Thank you. [02:14:10] Interesting. [02:14:15] Thank you.