1 00:00:00,620 --> 00:00:08,060 Now that we've got our data in the form of tenses most specifically batches of images in the form of 2 00:00:08,060 --> 00:00:13,570 tenses and labels in the form of tenses we can go back to our little workflow. 3 00:00:13,910 --> 00:00:20,620 Let's clean up our notebook a little bit and we can visualize what's happening with our data batches. 4 00:00:20,660 --> 00:00:24,880 Let's go check out our workflow boom we've done. 5 00:00:24,900 --> 00:00:26,850 Step 1 Get Data ready. 6 00:00:26,850 --> 00:00:27,770 Turning into tenses. 7 00:00:27,770 --> 00:00:32,970 Now this has taken a fairly long time to get to but this is what I want you to remember is that if we 8 00:00:32,970 --> 00:00:36,000 go here what are we focused on. 9 00:00:36,000 --> 00:00:43,410 A lot of our time is spent lining up our inputs with our outputs to make sure that they're consistent 10 00:00:43,980 --> 00:00:45,870 with a machine learning algorithm. 11 00:00:45,870 --> 00:00:51,810 So we want to input something in our case out photos of dogs with their labels in the form of tenses 12 00:00:51,930 --> 00:00:58,440 into a machine learning algorithm and then we want it to output some sort of learned patterns so that 13 00:00:58,440 --> 00:01:02,680 we can make predictions on more images over here fit the model to the data. 14 00:01:02,700 --> 00:01:07,410 My prediction and then evaluate them and improve and save our model later on. 15 00:01:08,040 --> 00:01:15,360 So this we're up to now picking a model from tensor flow hub to suit our problem a.k.a. our machine 16 00:01:15,420 --> 00:01:18,660 learning algorithm that is already implemented. 17 00:01:19,080 --> 00:01:21,970 Let's create a little section for doing that. 18 00:01:22,040 --> 00:01:22,400 Let's go. 19 00:01:22,430 --> 00:01:25,910 This is called building a model. 20 00:01:25,910 --> 00:01:30,100 There's a few things we need to define and that is what we've just seen here. 21 00:01:30,350 --> 00:01:35,360 The input shape of all of our images in the form of tenses to our model. 22 00:01:35,360 --> 00:01:42,980 We need the output shape a.k.a. the image labels in the form of tenses of our model and the U.R.L. of 23 00:01:42,980 --> 00:01:44,470 the model we want to use. 24 00:01:44,490 --> 00:01:46,420 And you might be wondering you are El. 25 00:01:46,430 --> 00:01:47,600 That's interesting. 26 00:01:47,600 --> 00:01:51,490 Well this is where we're going to find out what tensor flow hobbits. 27 00:01:51,650 --> 00:01:57,580 So let's write this down what we need to go before we build a model. 28 00:01:57,640 --> 00:02:04,420 Now I want to also stress that in machine learning and deep learning intensive low in particular there 29 00:02:04,420 --> 00:02:06,480 is a thousand ways to skin a cat. 30 00:02:06,490 --> 00:02:07,400 Pardon the pun. 31 00:02:07,420 --> 00:02:10,510 We're using dogs as our classifying problem. 32 00:02:10,630 --> 00:02:16,720 This is only one way of how you can build a deep learning model and we're going to utilize transfer 33 00:02:16,720 --> 00:02:22,900 learning so rather than building a model from scratch we're going to take what an existing model has 34 00:02:22,900 --> 00:02:30,280 already learned and apply it to our problem which saves us on energy in terms of training a model could 35 00:02:30,280 --> 00:02:34,870 take a long time cost because training a machine learning model isn't free. 36 00:02:34,930 --> 00:02:40,340 And then once we've found some baseline results we can try and improve them from there. 37 00:02:40,420 --> 00:02:43,780 So before we build a model there are a few things 38 00:02:46,480 --> 00:02:50,350 we need to define. 39 00:02:50,350 --> 00:02:59,440 One is the input shape how images shape in the form of tenses 40 00:03:03,250 --> 00:03:17,640 to our model and the output shape image labels in the form of tenses of our model. 41 00:03:17,630 --> 00:03:27,550 The U.R.L. of the model we want to use and we'll turn this into markdown. 42 00:03:27,810 --> 00:03:29,190 Wonderful. 43 00:03:29,190 --> 00:03:34,700 These three things maybe not the U.R.L. you might build a model from scratch but we're using a U.R.L. 44 00:03:34,700 --> 00:03:41,320 so that we can get started experimenting as quick as possible these three things will be standard practice 45 00:03:41,320 --> 00:03:43,860 with almost whatever machine learning model you use. 46 00:03:43,870 --> 00:03:47,380 Defining the inputs defining the outputs and defining the model. 47 00:03:48,190 --> 00:03:58,610 And because we use intensive flow everything will be in the form of tenses setup input shape to the 48 00:03:58,610 --> 00:04:00,500 model. 49 00:04:00,500 --> 00:04:01,070 And now 50 00:04:03,880 --> 00:04:12,370 I'm going to define this as what it is and then we'll figure out where these come from in a second but 51 00:04:12,460 --> 00:04:16,530 I want you to have a think about what this might be. 52 00:04:18,620 --> 00:04:20,250 So where have we seen none. 53 00:04:20,390 --> 00:04:26,950 Image size image size three before we go here. 54 00:04:26,950 --> 00:04:31,440 Remember what image size is 224 55 00:04:34,000 --> 00:04:34,740 so if we come up. 56 00:04:34,760 --> 00:04:37,880 Remember how we checked the shape of our data batch. 57 00:04:38,090 --> 00:04:43,000 None 2 2 4 2 2 4 3. 58 00:04:43,030 --> 00:04:45,180 Well that is the input shape of our image. 59 00:04:45,550 --> 00:04:54,650 And we've got batch height weight color channels wonderful. 60 00:04:54,820 --> 00:05:03,210 And now we want to set up the output shape of our model if we want our model to predict labels what 61 00:05:03,210 --> 00:05:09,860 might our output shape be how many different labels do we have. 62 00:05:09,860 --> 00:05:10,480 So let's go. 63 00:05:10,490 --> 00:05:13,750 Len unique reads 64 00:05:16,260 --> 00:05:23,660 120 so we could just put that as 120 but what we might do is just write this in code so that's the output 65 00:05:23,660 --> 00:05:24,320 shape of our model. 66 00:05:24,320 --> 00:05:28,790 So we wanted to input an image find some patterns in that image and then if we fed it an image in the 67 00:05:28,790 --> 00:05:35,590 future what it hasn't seen before we'd like it to find patterns in that image and then output after 68 00:05:35,590 --> 00:05:43,910 it you learned some patterns output an array of length unique labels which hopefully contains the correct 69 00:05:43,910 --> 00:05:47,250 label of what dog rate is in that image. 70 00:05:47,300 --> 00:05:54,830 And now here's where we're gonna go set up model U.R.L. from tensor flow hub 71 00:05:58,550 --> 00:05:59,620 eagles. 72 00:05:59,720 --> 00:06:01,340 What might this be. 73 00:06:02,060 --> 00:06:04,250 I want you before we get to the next video. 74 00:06:04,280 --> 00:06:09,400 I'm going to go through it in the next video is to go through tensor flow hub and just have a play around. 75 00:06:09,410 --> 00:06:15,090 Just have an explore and see if you can think about the problem that we're working on. 76 00:06:15,230 --> 00:06:18,100 We're doing multi class image classification. 77 00:06:18,110 --> 00:06:20,830 Think about that and see what you can find. 78 00:06:20,840 --> 00:06:28,940 Knowing that by just googling tend to flow hob and knowing our problem domain what information can you 79 00:06:28,940 --> 00:06:34,190 find out from tensor fly hub because that's exactly what we're going to be doing in the next video. 80 00:06:34,820 --> 00:06:37,130 So I have a try yourself and I'll see you soon.