1 00:00:00,580 --> 00:00:01,830 Welcome back. 2 00:00:01,900 --> 00:00:04,560 Now hopefully you've had a chance to check out tense afloat hub. 3 00:00:04,600 --> 00:00:05,710 If not that's okay. 4 00:00:05,710 --> 00:00:08,680 That's exactly what we're going to check out now. 5 00:00:08,740 --> 00:00:09,790 So let's go here. 6 00:00:09,800 --> 00:00:16,630 Tense a flow hub search that up intensive low hub. 7 00:00:16,720 --> 00:00:24,860 LET'S READ ABOUT IT intensive flow hub is a library for reusable machine learning models. 8 00:00:25,050 --> 00:00:26,310 Okay. 9 00:00:26,400 --> 00:00:31,290 So it has a flow hub is a library for the publication discovery and a consumption of reusable parts 10 00:00:31,290 --> 00:00:32,810 of machine learning models. 11 00:00:32,830 --> 00:00:39,510 The beautiful is a self-contained piece of tensor flow graph along with its weights and assets a.k.a. 12 00:00:39,600 --> 00:00:45,690 patterns so the patterns of previous model has learned that can be used reused across different tasks 13 00:00:45,720 --> 00:00:52,340 in a process known as transfer learning so transfer learning can train a model with a smaller dataset. 14 00:00:52,350 --> 00:00:53,270 Wonderful. 15 00:00:53,370 --> 00:00:56,590 Improved generalization and speed up the training. 16 00:00:56,880 --> 00:01:02,090 That is what we are interested in look how quickly you can get started by using a tensor flow model. 17 00:01:03,200 --> 00:01:04,910 How beautiful is that. 18 00:01:04,940 --> 00:01:11,780 And so this is tensor flow hub and now tend to flow is one of the biggest deep learning frameworks that's 19 00:01:11,780 --> 00:01:13,690 out there and it's the one that we're using right now. 20 00:01:13,700 --> 00:01:27,620 But I want to also show you that is also apply to a job and model zoo and papers with code Don't worry 21 00:01:27,620 --> 00:01:36,270 I'll link all of these so model zoo deep learning code and pre trained models pi torch if you're using 22 00:01:36,270 --> 00:01:42,120 pi torch so let's just let all these load unlike socket learn with your Roomba. 23 00:01:42,220 --> 00:01:52,500 We have the psychic learn machine learning that we go here so unlike psychic loan which has been pretty 24 00:01:52,500 --> 00:01:57,690 established for a fairly long time using more traditional machine learning techniques we've seen this 25 00:01:57,750 --> 00:02:05,910 map before in the psychic loan section one of these is kind of yet to be created for deep learning and 26 00:02:05,910 --> 00:02:13,370 neural networks and remember neural network is just another type of machine learning module. 27 00:02:13,480 --> 00:02:22,130 And so this is why we have these type of resources like pie to watch Harb tend to flow Harb model zoo 28 00:02:22,460 --> 00:02:25,430 open source Deep Learning Code and pre train models. 29 00:02:25,430 --> 00:02:31,160 Papers with code papers with code is like the latest trending research of the deep learning field and 30 00:02:31,250 --> 00:02:32,840 oftentimes you'll have the paper. 31 00:02:32,900 --> 00:02:38,990 So an academic paper and the code to go along with it on github which is absolutely amazing. 32 00:02:39,080 --> 00:02:45,500 And so these are some of the resources you should be coming to when you're first getting started exactly 33 00:02:45,500 --> 00:02:50,420 like what we're doing in dog vision where we're going to find out how to choose a U.R.L. and a second 34 00:02:51,690 --> 00:02:56,190 but because the book on deep learning a machine learning is still being written. 35 00:02:56,490 --> 00:03:01,890 Learning to build things from scratch when you first start is a great approach but instead the approach 36 00:03:01,890 --> 00:03:09,780 we're taking is focusing on working on a project first and then if you wanted to dive deeper to get 37 00:03:09,810 --> 00:03:14,270 anything like that's going on behind the scenes of what we're doing. 38 00:03:15,010 --> 00:03:15,920 You can do that. 39 00:03:16,000 --> 00:03:20,860 So don't let me control your zoom level as how far we're going in terms of depth. 40 00:03:20,890 --> 00:03:28,510 Once you start to solve problems like we're doing with dog vision working end to end you won't be able 41 00:03:28,510 --> 00:03:33,460 to help yourself you'll be compelled do you want to dive deep and figure out how to improve what we're 42 00:03:33,460 --> 00:03:34,670 working on. 43 00:03:34,750 --> 00:03:40,120 That's the best thing that I can kind of impart on you is rather than showing you how to do every single 44 00:03:40,120 --> 00:03:47,540 thing which would take a whole documentation course it's four times as long as this one and a lot more. 45 00:03:47,590 --> 00:03:51,920 It's better to just spark an interest and then on your own self. 46 00:03:51,970 --> 00:03:58,380 Search and self discovery you find resources like these and try and implement them on your own problems. 47 00:03:58,450 --> 00:04:02,680 So that's what we're focused on in dog vision is building an end to end project and then you can take 48 00:04:02,680 --> 00:04:10,420 what you've learned in dog vision go to these resources here model zoo papers with code and try and 49 00:04:10,480 --> 00:04:12,930 apply what you've learned to your own project. 50 00:04:12,970 --> 00:04:19,120 And then once you do once you get that little taste of working into and on a project you'll really start 51 00:04:19,120 --> 00:04:24,190 to want to go hey I need to figure out what's going on behind the scenes then and then your knowledge 52 00:04:24,190 --> 00:04:29,130 will will just grow from within itself which is a beautiful thing. 53 00:04:29,170 --> 00:04:35,590 So that's a kind of long winded philosophical speech on our training philosophy here. 54 00:04:35,620 --> 00:04:42,040 Let's see what we can do with tensor flow hub so Hello and welcome to tensor flow hub. 55 00:04:42,080 --> 00:04:49,880 Beautiful so there's a bunch of tutorials about how tensor flow works but you can browse by problem 56 00:04:49,880 --> 00:04:52,110 domain. 57 00:04:52,220 --> 00:04:53,270 This is what I was talking about. 58 00:04:53,270 --> 00:04:59,060 This is why it's so important to be able to define your problem like way back up in the top of our notebook. 59 00:04:59,690 --> 00:05:00,860 What's our problem. 60 00:05:00,860 --> 00:05:04,370 Identify the breed of a dog given an image of a dog. 61 00:05:04,370 --> 00:05:04,840 Okay. 62 00:05:04,910 --> 00:05:08,180 Nice and simple then this is a beautiful thing about collab right. 63 00:05:08,180 --> 00:05:10,390 You can just jump back and forth between your notebook. 64 00:05:10,520 --> 00:05:14,940 So let's go to tensor flow hub image beautiful. 65 00:05:14,970 --> 00:05:20,540 And what do we see here while this could look like a whole bunch of jargon. 66 00:05:20,660 --> 00:05:21,550 What's happening here. 67 00:05:22,130 --> 00:05:25,240 But let's pay attention to what's going on on the left. 68 00:05:25,430 --> 00:05:27,560 We've got image augmentation. 69 00:05:27,980 --> 00:05:32,160 Is any of these tags our problem augmentation. 70 00:05:32,160 --> 00:05:40,810 No classification yes image feature vector generator detection image others are in an age. 71 00:05:40,830 --> 00:05:43,270 Let's just look at image classification problems. 72 00:05:43,370 --> 00:05:44,430 All right. 73 00:05:44,430 --> 00:05:45,840 And so what's going on here. 74 00:05:46,440 --> 00:05:55,040 Well this is kind of like the tensor flow version of the socket loan machine learning map again. 75 00:05:55,190 --> 00:05:57,500 This is still in development phase. 76 00:05:57,620 --> 00:06:01,220 So just a couple of years ago this thing didn't even exist. 77 00:06:01,220 --> 00:06:05,690 So this is how beautiful the field is getting now we're starting to go okay. 78 00:06:05,780 --> 00:06:08,120 These are all machine learning models. 79 00:06:08,120 --> 00:06:11,870 I just gave that away that spoiler and these are ones that work pretty good. 80 00:06:11,900 --> 00:06:18,560 So rather than retrain a machine learning model from scratch every time and take up a bunch of computing 81 00:06:18,560 --> 00:06:24,740 power and a bunch of time and a bunch of resources let's just publish all the patents that we find in 82 00:06:24,740 --> 00:06:31,390 previously built machine learning models so that other people can apply them to their own problem what 83 00:06:31,390 --> 00:06:32,020 could we find. 84 00:06:32,020 --> 00:06:33,650 Let's have a look at architecture. 85 00:06:33,700 --> 00:06:41,700 Architecture is another word for machine learning model or neural network architecture with no networks. 86 00:06:41,710 --> 00:06:47,460 You'll probably find that they have some pretty fancy names like Inception resonate V2. 87 00:06:47,470 --> 00:06:54,130 Sounds like a crazy movie resonate v 150 resonant V2 50 and now I want to show you something about resonate. 88 00:06:54,130 --> 00:06:59,020 We're actually not going to use this one but I want to just show you the power of what it's like. 89 00:06:59,020 --> 00:07:07,480 So if we click on here this is gonna give us a link copied to clipboard that's as easy as it is using 90 00:07:07,480 --> 00:07:10,590 a pretty trained resonant model we can copy that you're RL. 91 00:07:10,660 --> 00:07:12,090 Or we could download the model. 92 00:07:12,310 --> 00:07:17,320 But if we go here this is how we create a resonant model. 93 00:07:17,320 --> 00:07:24,570 The reason why I want to show you resonate especially resonate 50 is that Tesla use resonate 50 backbones. 94 00:07:24,580 --> 00:07:31,870 This is why transfer learning is so important to understand is because if we go here this is resonant 95 00:07:31,870 --> 00:07:33,890 V2 50. 96 00:07:34,270 --> 00:07:39,980 I took this slide here from a torque called Pi tortured Tesla by Andre capacity. 97 00:07:40,060 --> 00:07:47,140 You can watch it now I'll be sure to link it but their computer vision systems in their Tesla cars use 98 00:07:47,140 --> 00:07:50,040 resonate 50 like diluted backbones. 99 00:07:50,050 --> 00:07:57,280 Of course they'll have custom layers and whatnot but what I'm saying is is that we have access to very 100 00:07:57,280 --> 00:08:03,510 similar machine learning models as what are you being used in production at companies like Tesla. 101 00:08:03,520 --> 00:08:08,480 So that's why it's important to be aware of these resources that are available to us. 102 00:08:08,680 --> 00:08:14,050 And I know that this says pie to watch but the beautiful thing is if you come up to pi to a hub you 103 00:08:14,050 --> 00:08:18,830 could probably find it they go resonate 1 0 1 all that sort of stuff. 104 00:08:18,860 --> 00:08:20,670 Now we're working tend to flow. 105 00:08:21,170 --> 00:08:22,580 Let's go back to here. 106 00:08:22,640 --> 00:08:24,580 I have the model in mind that we want to use. 107 00:08:24,580 --> 00:08:26,180 So we go architecture. 108 00:08:26,420 --> 00:08:32,300 This is gonna take a little bit of exploring on your behalf but what you can essentially assume here 109 00:08:32,780 --> 00:08:39,230 is that the higher the number the better the model but also the tradeoff there is the higher the number 110 00:08:39,260 --> 00:08:41,450 the longer it takes to to train. 111 00:08:42,050 --> 00:08:49,250 So mobile Net This is your homework for this video is to Google mobile Net just look it up and just 112 00:08:49,250 --> 00:08:49,880 read about it. 113 00:08:51,370 --> 00:09:00,550 So we're gonna use this one here image classification so if we have a read about this do you have to 114 00:09:00,550 --> 00:09:01,110 save model. 115 00:09:01,120 --> 00:09:07,630 This is a save model intensive low to format it requires using tensor flow to or one point one five 116 00:09:07,690 --> 00:09:08,230 and higher. 117 00:09:08,740 --> 00:09:11,320 So that's what we're using tensor flow to beautiful. 118 00:09:11,590 --> 00:09:17,140 So mobile Net v2 is a family of neural network architectures for efficient on device image classification 119 00:09:17,140 --> 00:09:18,460 and related task. 120 00:09:18,460 --> 00:09:22,120 Originally published by so that's was originally published. 121 00:09:22,120 --> 00:09:25,940 Now remember right back at the start what our problem is. 122 00:09:26,170 --> 00:09:31,330 I was sitting at the cafe the other day this beautiful dog came walking pass and the friend I was with 123 00:09:31,330 --> 00:09:37,540 said that's an Australian terrier and I was like wow I wish I could take a photo of that dog on my phone 124 00:09:38,080 --> 00:09:40,570 and figure out what kind of dog it was. 125 00:09:40,570 --> 00:09:46,570 So this is where we come to mobile Net where it's efficient on device image classification. 126 00:09:46,570 --> 00:09:49,210 That's exactly what I want to do with dog vision. 127 00:09:49,210 --> 00:09:50,230 Beautiful. 128 00:09:50,230 --> 00:09:54,140 So we can come here we can see it's got some guidelines of what we can do. 129 00:09:54,160 --> 00:09:58,720 This is your homework as well is to read through this even if you don't understand it at first go. 130 00:09:58,720 --> 00:10:02,760 Just have a read through it and we'll leave this link in the resources section. 131 00:10:02,790 --> 00:10:06,000 By the way this is where we got that batch input shape. 132 00:10:06,010 --> 00:10:06,790 There we go. 133 00:10:06,970 --> 00:10:09,310 2 2 4 2 2 4 3. 134 00:10:09,550 --> 00:10:11,330 Little number on the end here. 135 00:10:11,560 --> 00:10:14,320 But if you were reading through this that's where you would figure that out. 136 00:10:14,320 --> 00:10:20,070 So let's copy this to the clipboard come back and this is our model U.R.L.. 137 00:10:20,080 --> 00:10:30,390 We're going to change that into a string and we're going to put it in here from tensor flow hub and 138 00:10:30,390 --> 00:10:33,970 then we'll put a link to tensor flow hub. 139 00:10:34,150 --> 00:10:35,320 Wonderful. 140 00:10:35,380 --> 00:10:38,950 Come back to dog vision. 141 00:10:38,960 --> 00:10:39,920 There we go. 142 00:10:39,920 --> 00:10:41,860 So what have we got set up now. 143 00:10:41,890 --> 00:10:47,390 So if we come back to our keynote this is what we've set up we've picked a model from tensor flow hub 144 00:10:47,390 --> 00:10:48,200 to suit our problem. 145 00:10:48,200 --> 00:10:52,310 Remember we went through our problem domain and we're working with images. 146 00:10:52,310 --> 00:10:57,020 What we're focused on is our inputs we've done that we've got our data ready and we turned it into tenses 147 00:10:58,040 --> 00:11:00,540 and we've chosen our machine learning algorithm. 148 00:11:00,560 --> 00:11:05,690 Wonderful and now we've got our output shape correct. 149 00:11:05,690 --> 00:11:12,160 Now we've got these three key criteria we have to work out how we can use them all together. 150 00:11:12,290 --> 00:11:18,170 The next process is putting them together in the form of a function that's going to create a model for 151 00:11:18,170 --> 00:11:24,610 us and return it so that we can fit it to our data set. 152 00:11:24,650 --> 00:11:27,410 So let's get started on that in the next video. 153 00:11:27,410 --> 00:11:34,470 But remember for now your homework is to read up about tensor flow hub and to checkout mobile Net V2 154 00:11:34,570 --> 00:11:36,120 132 to 4. 155 00:11:36,410 --> 00:11:40,010 All link both of these and these other resources in the resources section.